Skip to content

Instantly share code, notes, and snippets.

@sandfox
sandfox / CertificateGeneration.sh
Created February 15, 2012 00:11
TLS certificate inspection example (using nodejs)
###
#Step 1 - Generate server certificates etc... (most of this code is horribly ripped off from nodejs docs currently -> http://nodejs.org/docs/latest/api/tls.html)
###
#Assuming your starting from a clean directory
mkdir server
cd server
#generate private key
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@nicdoye
nicdoye / mysqlbackup.sh
Created February 2, 2013 13:07
Backup your OpenShift MySQL database. My DB is only small so I didn't bother to compress it through a pipe. sftp it back from your local machine afterwards This is basically a quick hack from running "type mysql" on the OpenShift gear - hint: it's a bash function/alias
mkdir ~/app-root/data/tmp
mysqldump -h $OPENSHIFT_MYSQL_DB_HOST -P ${OPENSHIFT_MYSQL_DB_PORT:-3306} -u ${OPENSHIFT_MYSQL_DB_USERNAME:-'admin'} --password="$OPENSHIFT_MYSQL_DB_PASSWORD" --all-databases > ~/app-root/data/tmp//all.sql
@addyosmani
addyosmani / headless.md
Last active May 1, 2024 03:05
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 2, 2024 22:18
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@max-mykhailenko
max-mykhailenko / # Sublime Emmet JSX Reactjs.md
Last active November 25, 2022 23:25
Sublime text 3. Enable Emmet in JSX files with Sublime React plugin

This is no longer needed as Emmet supports JSX - you just need to turn it all on. Did a quick tutorial: http://wesbos.com/emmet-react-jsx-sublime/

Thanks, @wesbos

Problem

  • Using emmet in jsx files
  • Emmet expands text when js autocomplete needed
@Marak
Marak / dockerCheatSheet.md
Last active October 31, 2023 20:48
docker cheat sheet

Things I wish I knew before I started using Docker

Commands

Init docker on mac os

boot2docker init

Restart docker vm on mac os

boot2docker up
//META{"name":"SendEmbeds"}*//
function SendEmbeds() {
return;
}
SendEmbeds.prototype.load = function() {};
SendEmbeds.prototype.unload = function() {};
@EvilFreelancer
EvilFreelancer / builder.sh
Created November 10, 2018 16:15
Upwork on NixOS
#!/bin/sh
source $stdenv/setup
PATH=$dpkg/bin:$PATH
dpkg -x $src unpacked
cp -r unpacked/* $out/