Skip to content

Instantly share code, notes, and snippets.

View scribu's full-sized avatar

Cristi Burcă scribu

View GitHub Profile
@pgilad
pgilad / Instructions.md
Last active March 27, 2024 12:59
Generate SSL Certificate for use with Webpack Dev Server (OSX)

Generate private key

$ openssl genrsa -out private.key 4096

Generate a Certificate Signing Request

openssl req -new -sha256 \
@matthewtole
matthewtole / gcolor.js
Created February 26, 2015 23:39
GColor utilities for PebbleKit JS
/*
GColor
A small utility library for dealing with GColor in the new PebbleSDK.
----------------------
The MIT License (MIT)
Copyright © 2015 Matthew Tole
Permission is hereby granted, free of charge, to any person obtaining a copy
@JesseBuesking
JesseBuesking / logging.yaml
Created April 14, 2014 18:54
Testing MultiProcessingLog on both Windows 7 Enterprise and Ubuntu Developers Version 10.04_20121120.
---
version: 1
disable_existing_loggers: False
formatters:
simple:
format: "%(name)-20s%(levelname)-8s%(message)s"
handlers:
console:
class: logging.StreamHandler
level: DEBUG
@vuldin
vuldin / default.prop
Last active December 22, 2015 18:29
Install latest dev build of FxOS on ZTE Open
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.usb.serialno=full_inari
persist.sys.usb.config=adb
@markjaquith
markjaquith / gist:6225805
Last active February 21, 2024 23:56
WordPress multi-tenant directory structure sharing core files for opcode awesomeness, fast deployments, and low disk usage. With inspiration from @weskoop. "=>" indicates a symlink.
sites
|__ ms.dev
| |__ content
| |__ index.php
| |__ wp => ../../wordpress/stable
| |__ wp-config.php
|__ one.dev
| |__ content
| |__ index.php
| |__ wp => ../../wordpress/stable
@westonruter
westonruter / readme.md
Last active December 19, 2015 17:38
vassh: Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder

THIS REPO HAS MOVED! It has graduated to a dedicated GitHub project: https://github.com/x-team/vassh

The big pain of doing vagrant ssh is that it doesn’t drop you into the corresponding working directory in the Vagrant guest’s synced_folder, so you have to cd to the dir and then run whatever you needed to do (e.g. wp core update). This is the problem that vassh solves: it will make sure you start out in the corresponding directory. So if you’re in your WordPress project on your host machine, all you need to do is:

$ vassh wp core update

There’s also a wrapper called vasshin which will shell you into Vagrant at the current directory, with a prompt for entering commands. This gets you colors and interactive TTY. You can also pass commands as arguments to vasshin to have them executed right away in the colorized TTY (with some additional Vagrant .bash_login echoes and SSH connection close):

@nacin
nacin / trac-attach.sh
Last active March 21, 2016 09:37
A script that leverages Trac XML-RPC (I know, I know) to upload patches. Usage: `trac-attach.sh 12345`
#!/bin/sh
# A script that leverages Trac XML-RPC (I know, I know) to upload patches.
#
# This script is written specifically for the Mac, in that it reads from
# your keychain to derive your SVN password. You can change the SVN_PASS
# line below if you wanted to pull from ~/.svn/ or what not.
#
# Basic usage: `trac-attach.sh 12345` uploads a patch to ticket #12345,
# using the name 12345.diff. If there exists a 12345.diff, the patch is
@floydpink
floydpink / travis-secure-key-mac.sh
Last active March 6, 2021 22:18 — forked from lukewpatterson/gist:4242707
Generating secure environment variables for GitHub deployment keys to be used from a Travis-CI build.
# On a Mac, use this script to generate secure deployment key
# To generate secure SSH deploy key for a github repo to be used from Travis
base64 --break=0 ~/.ssh/id_rsa_deploy > ~/.ssh/id_rsa_deploy_base64
ENCRYPTION_FILTER="echo \$(echo \"- secure: \")\$(travis encrypt \"\$FILE='\`cat $FILE\`'\" -r floydpink/harimenon.com)"
# If you don't have homebrew please install it from http://brew.sh/
brew install coreutils
gsplit --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_deploy_base64 id_rsa_
# To reconstitute the private SSH key from within the Travis-CI build (typically from 'before_script')
@thomasgriffin
thomasgriffin / gist:4368038
Created December 24, 2012 06:22
This is the way you should send content to the TinyMCE Editor in WP 3.5.
// This replaces the old window.send_to_editor function.
wp.media.editor.insert('your_content_goes_here');