Skip to content

Instantly share code, notes, and snippets.

View BretFisher's full-sized avatar
🗃️
All Day Containers!

Bret Fisher BretFisher

🗃️
All Day Containers!
View GitHub Profile
@syntagmatic
syntagmatic / gist:2202660
Created March 26, 2012 03:30
Export CSV with Javascript
// assumes variable data, which is a homogenous collection of objects
// get keys
var keys = _.keys(data[0]);
// convert to csv string
var csv = keys.join(",");
_(data).each(function(row) {
csv += "\n";
csv += _(keys).map(function(k) {
@blakmatrix
blakmatrix / command line shell
Created July 3, 2012 09:07
Getting Meteor todos up on nodejitsu/jitsu
meteor create --example todos
meteor bundle myapp.tgz
tar xzf myapp.tgz
cd bundle
(create package json with settings below)
jitsu databases create mongo <dbname>
(grab dbstring)
jitsu env set PORT 3000
jitsu env set MONGO_URL <dbstring>
jitsu deploy
@aaronlerch
aaronlerch / README.md
Created August 7, 2013 16:46
Upstart scripts for MongoDB Monitoring Service agent (MMS) MongoDB Backup Service agent (MBS?)

Download

Download and install the agent(s). These examples are on a standard 64-bit Amazon EC2 Linux AMI.

MMS

wget [path to mms agent download, specified by 10gen]
sudo tar xvzf 10gen-mms-agent-[CUSTOM_NAME].tar.gz -C /opt
@trebortech
trebortech / notes
Created February 15, 2016 15:58
Salt the easy way
The following instructions will help you easily deploy out a SaltStack Master server with some basic settings.
Step 1.
Install docker on your machine where you want to run your SaltStack master. If you want to run this on Windows you could install virtualbox and deploy our a Linux VM that has docker installed on it. Additional network setup instructions are available upon request.
https://docs.docker.com/engine/installation/
Step 2.
Confirm docker is installed and running correctly
@estesp
estesp / clash-instructions.md
Last active August 12, 2016 18:25
Ubuntu 16.04 / LXFS / Docker daemon + user namespaces clash

The Problem

See Docker issue #24834 for the more complete background. The short story is that if lxcfs is installed (which it is by default in Ubuntu 16.04) and you attempt to use the Docker daemon with user namespaces enabled, most likely you will end up with a confusing "container command could not be invoked error" like the one here:

# docker run --rm busybox date
docker: Error response from daemon: Container command 'date' could not be invoked..
@kopischke
kopischke / markdown2evernote.rb
Created June 5, 2011 16:57
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)
@trajano
trajano / Dockerfile
Created July 16, 2020 19:19
Preloaded anonymized data
# This is only used for development. The production will use AWS RDS
FROM mysql:5.7.23 as prep
# Copy your anonymized files
COPY *.anon.sql /docker-entrypoint-initdb.d/
# zz.grant-all-to-sample-user.sql script that to change the permissions on the anonymized data in case it is not owned by the test user
# grant all on *.* TO 'sampleuser'@'%';
@valpackett
valpackett / LICENSE.md
Created November 10, 2011 17:48
Evernote-Marked integration
       DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
               Version 2, December 2004

Copyright (C) 2011 Grigory V. floatboth@me.com

Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

@3rd-Eden
3rd-Eden / README.md
Last active January 4, 2021 10:20
Protecting against POODLE in node.js

[Google recently announced][poodle] that there is an exploit in SSLv3, this vulnerability is know as POODLE. There is no other option than to disable SSLv3 in order to combat this major flaw. There have already been [guides on how to disable this in different servers][guides]. But nothing excised for Node.js yet, until now. In order to resolve this for Node.js we need to use various of undocumented options and modules.

In the index.js file below you can see an example of how you can protect your HTTPS server against the POODLE attack. It uses the secureOptions option to pass in constants in to the SSL context which is created by node.