Skip to content

Instantly share code, notes, and snippets.

Avatar

Cristi Burcă scribu

View GitHub Profile
@pgilad
pgilad / Instructions.md
Last active May 4, 2022
Generate SSL Certificate for use with Webpack Dev Server (OSX)
View Instructions.md

Generate private key

$ openssl genrsa -out private.key 4096

Generate a Certificate Signing Request

openssl req -new -sha256 \
@matthewtole
matthewtole / gcolor.js
Created Feb 26, 2015
GColor utilities for PebbleKit JS
View gcolor.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 Apr 14, 2014
Testing MultiProcessingLog on both Windows 7 Enterprise and Ubuntu Developers Version 10.04_20121120.
View logging.yaml
---
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 Dec 22, 2015
Install latest dev build of FxOS on ZTE Open
View default.prop
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 Jul 28, 2022
WordPress multi-tenant directory structure sharing core files for opcode awesomeness, fast deployments, and low disk usage. With inspiration from @weskoop. "=>" indicates a symlink.
View gist:6225805
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 Dec 19, 2015
vassh: Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder
View readme.md

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 Mar 21, 2016
A script that leverages Trac XML-RPC (I know, I know) to upload patches. Usage: `trac-attach.sh 12345`
View trac-attach.sh
#!/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 Mar 6, 2021 — forked from lukewpatterson/gist:4242707
Generating secure environment variables for GitHub deployment keys to be used from a Travis-CI build.
View travis-secure-key-mac.sh
# 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 Dec 24, 2012
This is the way you should send content to the TinyMCE Editor in WP 3.5.
View gist:4368038
// This replaces the old window.send_to_editor function.
wp.media.editor.insert('your_content_goes_here');