Skip to content

Instantly share code, notes, and snippets.

View ebylund's full-sized avatar
🔰
Staying Gold

Erik Bylund ebylund

🔰
Staying Gold
  • Apollo GraphQL
  • Lehi, Utah
View GitHub Profile
@ebylund
ebylund / install.sh
Created November 30, 2021 16:47
mac setup script
echo "installing new dev environment"
@ebylund
ebylund / instance-name-tag.sh
Created October 24, 2017 19:10 — forked from swithrow/instance-name-tag.sh
EC2 Instance Name Tag in the bash prompt.
#!/bin/bash
#
# copy this into /etc/profile.d/instance-name-tag.sh
#
# you will need:
# - curl, jq, and aws cli installed
# - an IAM role that gives the EC2 instance access to describe tags
#
@ebylund
ebylund / vim-registers.md
Last active June 20, 2017 22:52
An example of using vim registers to reformat a config file

with vim, I wanted to change the following line items in a file:

    aws.kinesis.version: "this is just some version of this text"

to look like:

AWS_KINESIS_VERSION="this is just some version of this text"

using vim Macros, the following sequence of character is reponsible for the changes:

@ebylund
ebylund / php-server.sh
Created March 21, 2016 20:20
simple php server helper to develop locally
#!/bin/bash
passed="false"
while [ $passed != "true" ]
do
read -p "What port do you want your server on?: " port;
if [ $port -gt "65535" ]
then
echo -e "\033[31mport:$port\033[0m too high, Please choose a port number less than 65535"
<?php
require __DIR__.'/vendor/autoload.php';
use Memio\Memio\Config\Build;
use Memio\Model\File;
use Memio\Model\Object;
use Memio\Model\Property;
use Memio\Model\Method;
use Memio\Model\Argument;
echo "${PWD##*/}"
for f in ./*; do [[ -d $f ]] && touch "$f.yaml"; done`
@ebylund
ebylund / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console