Skip to content

Instantly share code, notes, and snippets.

View patrickocoffeyo's full-sized avatar
🏠
Working from home

Patrick Coffey patrickocoffeyo

🏠
Working from home
View GitHub Profile
@chasingmaxwell
chasingmaxwell / lambda-duration
Last active March 10, 2022 03:50
AWS CloudWatch Insight Queries
filter @type = "REPORT"
| stats
avg(@billedDuration) as Average,
percentile(@billedDuration, 99) as NinetyNinth,
percentile(@billedDuration, 95) as NinetyFifth,
percentile(@billedDuration, 90) as Ninetieth
by bin(30m)
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@pinge
pinge / ubuntu_14.04_macbook_pro_retina_15_inch_mid_2014.md
Last active March 10, 2021 03:05
How to install Ubuntu 14.04.1 LTS on a MacBook Pro Retina 15" Mid 2014 (11,3)
Listen 80
# Use name-based virtual hosting.
NameVirtualHost *:80
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" dynamic_vhosts
CustomLog /var/log/apache2/access_log dynamic_vhosts
<VirtualHost *:80>
@iMagdy
iMagdy / how_to_upload_local_db_to_meteor_app.sh
Last active February 27, 2016 09:55
How to upload local db to meteor app
# How to upload local db to meteor:
# -h = host, -d = database name, -o = dump folder name
mongodump -h 127.0.0.1:3002 -d meteor -o meteor
# get meteor db url, username, and password
meteor mongo --url myapp.meteor.com
# -h = host, -d = database name (app domain), -p = password, meteor = the path to the dumped db folder name
mongorestore -u client -h production-db-a2.meteor.io.meteor.com:27017 -d myapp_meteor_com -p 'password' meteor/
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh