Skip to content

Instantly share code, notes, and snippets.

View patrickod's full-sized avatar
🔐

Patrick O'Doherty patrickod

🔐
View GitHub Profile
@grugq
grugq / gist:03167bed45e774551155
Last active June 17, 2025 15:52
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@takeshixx
takeshixx / hb-test.py
Last active April 14, 2025 17:04
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@joernchen
joernchen / bounty.txt
Created February 22, 2014 16:17
Bounty writeup
GitHub RCE by Environment variable injection Bug Bounty writeup
Disclaimer: I'll keep this really short but I hope you'll get the key points.
GitHub blogged a while ago about some internal tool called gerve:
https://github.com/blog/530-how-we-made-github-fast
Upon git+sshing to github.com gerve basically looks up your permission
on the repo you want to interact with. Then it bounces you further in
another forced SSH session to the back end where the repo actually is.
@jayphelps
jayphelps / resolver.js
Last active September 4, 2020 17:56
Example of using multiple Ember.Namespaces with a custom Ember.Resolver to reuse code between projects. Ember App Kit's resolver as another example: https://github.com/stefanpenner/ember-jj-abrams-resolver DefaultResolver docs: https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/resolver.js
/**
* Super namespace that all our libs and apps will live on. We also extend all
* of the native Ember classes as well and exclusely use them that way so we can
* alter the behavior in one place without needing to reopen the original class.
*
* We call the super namespace PS for Pivotshare, call it what you'd like.
*/
window.PS = Ember.Namespace.create();
// Create our custom resolver so we can have Ember look up classes on multiple
@ukd1
ukd1 / decrypt.sh
Created November 15, 2013 18:59
Super simple shell scripts we use at www.rainforestqa.com for encrypting / decrypting / updating our Heroku apps with private environment variables
#!/bin/bash
gpg qa.txt.asc
gpg staging.txt.asc
gpg production.txt.asc
@goldsmith
goldsmith / numpy_os_x_10_9.sh
Last active January 6, 2024 07:25
How to install Numpy and Scipy on Mac OS X Mavericks (10.9) using Pip.
# set up flags for Numpy C extentions compiling
export CFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-m32 -m64"
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64"
export CC=gcc-4.2
export CXX="g++ -arch i386 -arch x86_64"
pip install numpy
# success!
@mikeal
mikeal / gist:6685843
Last active December 23, 2015 19:58
Response to comments by Issac Roth of StrongLoop

This is rather out of date and we've all moved past it. Me and Issac are cool now.

pic

@adamalex
adamalex / docker-strongloop.sh
Last active August 8, 2017 10:40
Single-command evaluation of StrongLoop Node using Docker
# PREREQUISITE
# Install Docker: http://www.docker.io/gettingstarted/
# SINGLE COMMAND STRONGLOOP NODE.JS (http://strongloop.com) EVALUATION
# This will log you in to an isolated lightweight virtual system (LXC)
# - Base Ubuntu 12.10 (Quantal Quetzal)
# - StrongLoop Node 1.1 GA
docker run -i -t adamalex/strongloop bash

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
@konklone
konklone / problem-solving.md
Last active March 16, 2016 08:18
Problem solving high memory usage with node.js, websockets, socket.io, and redis.

Problem: My Node.js processes (drones on Nodejitsu) are repeatedly growing in memory until they crash and get restarted. They are multiple processes responding to websockets connections over socket.io, using socket.io's Redis store to broker messages across connections and broadcast messages.

Conclusion: that socket.io's Redis store's memory usage likely either grows indefinitely, or is just way too high. We also isolated semi-frequent reconnects to the redis client on the part of each node.js process, though this looks unrelated to the overall memory problem.

Possibly related: socketio/socket.io#1040 socketio/socket.io#463

=== edited chat log of #nodejitsu on 25/11/2012 follows ==