Skip to content

Instantly share code, notes, and snippets.

View bil9000's full-sized avatar

bil9000 bil9000

View GitHub Profile
@bil9000
bil9000 / gist:f80290a4d2b8bab89a8ec19239fdf433
Last active June 18, 2021 00:40
shortcut to a folder - alisas - ln

I keep forgetting this and looking it. no more!

ln ~/Git/er-environments/s111-dev/terraform ~

That command will create a link to the terraform folder and will also create an alias called terraform in my home directory.

@bil9000
bil9000 / AH-See.md
Last active March 31, 2021 05:29
AH. But you know what.

A.) You won't answer. The most likely. 70 % chance.

B.) You will answer a differnt question. 27% chance.

C.) You will answer "of corsue" with no thought or effort. 2% chance.

D.) You will let the question sink into the marrow of your bones and realize what you have always known. 1% chance.

Click the upper left "Revisions" link for the time I wrote this. Can't hack that. Hammertime.

@bil9000
bil9000 / gist:d38a1a757d698b5b7524b51a41c8a8a1
Created March 2, 2021 02:55
Recursively Lock Or Unlock Files and Folders
I have liberated this next copy and paste from [tinyapps.org](https://tinyapps.org/blog/200912130700_lock_unlock_files_recursively_os_x.html) oh, who had in turn liberated it from someobdy else. ButI'm going back after one query, if you want to dig down into the origin story of the the locking or unlocking scripts, there is only so much I can do for you. Fly away and be free!
uchg is to lock the folder (think unchanged)
nouchg is the oppostie (no think unchanged)
```
chflags -R uchg directory
chflags -R nouchg directory
```
@bil9000
bil9000 / aws-ec2-lookee-upee.sh
Last active February 11, 2021 21:02
finding aws ec2 stuff. This command grabs the InstanceID, Instance Name, PrivateIP and VPC
aws ec2 describe-instances \
--filters Name=tag-key,Values=Name \
--query 'Reservations[*].Instances[*].{Instance:InstanceId,Vpc:VpcId,PrivateIP:PrivateIpAddress,Name:Tags[?Key==`Name`]|[0].Value}' --output table >> instances.tsv
@bil9000
bil9000 / flatten.md
Last active June 27, 2021 18:10
flatten folders, de-hierarchize your stuff, get you junk out of the trunks.

useful commands series

flatten folders, de-hierarchize your stuff, get your junk out of the trunks.

echo "This pulls your attachemnets for imessage out of the sub-folders and oput it in the main one. needst to be run one outside (above) attachments."

find ~/Library/Messages/Attachments/ -mindepth 2 -type f -exec mv '{}' ~/Library/Messages/Attachments/ ';'

#!/bin/bash
sudo apt-get update
sudo apt-get upgrade -y
sudo apt install mariadb-server mariadb-client -y
sudo apt install apache2 -y
sudo apt install php libapache2-mod-php php-opcache php-cli php-gd php-curl php-mysql -y
sudo systemctl restart apache2
sudo systemctl start apache2.service
sudo systemctl enable apache2.service
sudo systemctl start mariadb.service

Keybase proof

I hereby claim:

  • I am bil9000 on github.
  • I am bkoplitz (https://keybase.io/bkoplitz) on keybase.
  • I have a public key whose fingerprint is 8628 9E7C 8D64 A4D9 BF85 2634 EAFD 078B 9405 0733

To claim this, I am signing this object:

@bil9000
bil9000 / etherpadliteInstallUbuntu.sh
Created April 18, 2016 01:06
etherpad-lite on ubuntu 14.04
#!/bin/bash
# This is a completly untested script hacked together from a history
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install zip -y
wget http://github.com/ether/etherpad-lite/zipball/master
sudo apt-get install git -y
git clone https://github.com/ether/etherpad-lite.git
sudo apt-get install gzip git curl python libssl-dev pkg-config build-essential -y
wget https://nodejs.org/dist/v4.4.3/node-v4.4.3.tar.gz
@bil9000
bil9000 / gist:d9f75a9a8692b6743606
Last active September 5, 2015 07:31 — forked from mahantheshhv/gist:30b2dc41fd731df245e1
install 7zip on linux
In this case, in AWS Linux:
yum-config-manager --enable epel
yum install -y p7ip
cp /usr/bin/7za /usr/bin/7z
7z