Category: Post
-

Command to Compress and Password Protect
Lately I’ve been needing to send some folks password protected zip files. Below is a short and basic snippet that you can use to run in your terminal. Once your run the above snippet, enter a password. oldFolder is the folder with your contents newFOLDER is the name of the outputed zip file of this command The output will…
-

Transform camelCase a Camel Case with Regex
I’m quite terrible at regex, but lately I figured that I actually really need to learn it. Below is a snippet for transforming “camelCase” strings into “Camel Case” strings.
-

Troubleshoot ESLint $ Errors
-

Align Divs on a Line
A few days ago I had to make a few divs of varying height. Unfortunately, they were looking a little wonky because they weren’t aligning. I made them display: inline-block, but what’s going on? Making my divs display as inline-block was to make my divs appear on the same line. However, it was not enough to make them straight. TLDR; I had…
-

Copy Text With JS
I found this jewel somewhere:
-

Setting up React & Hot Reloader
my package.json should look like this: add the following script: my webpack.config.js should look like this: my webpack.deployment.config.js should look like this: my app/index.js should looke like this: my app/Component.jsx should looke like this: my index.html should look like this:
-

So I Started Using VIM
So I recently started using VIM and now I can’t stop typing :q whenever I want to close random browser windows. Here are the VIM plugins I’ve been using: VIM Plug – for adding VIM plugins Nerd Tree – VIM tree view Nerd Tree Git – git plugin to view git status in tree view Emmet – for fast HTML &…
-

(Swift) Programmatically Segue
Using the code from my previous post on segues, here’s a snippet:
-

Launch Sublime in Terminal
Launch Sublime: subl Launch an entire folder: subl . Launch a particular file: subl blah.xxx
-

(Swift) Adding Audio
Utilize AudioToolbox and make a class, Sound, to pass in the filename of you audio file and it’s type. Tools: Then, call it like so:
-

(Swift) Stop Using the Storyboard
I started learning Swift about three months ago and when I started I used the storyboard. This post will be a snippet of how you can stop using the storyboard! The major benefit of not using the storyboard is not having messy merge conflicts. Long story short, the storyboard file is a fairly large xml file and every time you open it something changes. Every…
-

(Swift) Layout Constraints
A whiles back ago I was trying to learn how constraints work. Today, I still have no idea what the heck is going on. While learning, I can across a bunch of tutorials that helped. However, I don’t remember what blog I particularly liked. This post contains a couple of classes that I made to help me…
-

(Swift) Detect Typing
Here’s a snippet on how to detect typing on your Swift app. It’s pretty simple because we’re utilizing the UITextViewDelegate delegate. Aka, built in success – thank you Swift! Tools: This snippet is pretty short. See below for some code that will print out text when you type.
-

(Swift) Creating a UITableView
Here’s a snippet on how to make a UITableView. Check out the code below! Tools:
-

(App/Extension) The Great Suspender
I just started using this Chrome extension. It’s called The Great Suspender and it times out, or suspends, idle tabs in your browser to save memory and system resources. This is super great if you’re one of those people who have hundreds of tabs open but never seem to be able to get rid of them after…
