Skip to content

Instantly share code, notes, and snippets.

View akoumjian's full-sized avatar

Alec Koumjian akoumjian

View GitHub Profile
@npearce
npearce / install-docker.md
Last active May 9, 2024 18:42
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active May 7, 2024 13:07
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@kerryrodden
kerryrodden / README.md
Last active January 18, 2021 11:05
Zoomable sunburst with updating data

I combined Mike Bostock's Zoomable Sunburst and Sunburst Partition examples, so that I could have both zooming and updating the underlying data (between count and size, in this case). A simple combination of the examples does not work; you have to edit the arcTween function used for updating the data, so that when it redraws the partition layout, it takes account of the current zoom level by adjusting the domain of the x scale.

Click on any arc to zoom in, and click on the center circle to zoom out. Use the Size/Count radio buttons to update the data.

@ispedals
ispedals / video-thumbnail-display.html
Created May 20, 2013 16:19
Experiment creating thumbnails of MP4 videos using the HTML5 Filereader API. Currently, the loading of videos in rapid succession fails with a decoding error, and if too many videos are processed concurrently, the display driver crashes.
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="https://rawgithub.com/caolan/async/master/lib/async.js"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script>
window.URL = window.URL || window.webkitURL;
@jshaw
jshaw / byobuCommands
Last active May 5, 2024 13:01
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@msievers
msievers / example.gemspec
Created September 27, 2012 08:19
Gemspec which includes files from git submodules into resulting gem
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/example/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["John Doe"]
gem.email = ["john_doe@example.org"]
gem.description = %q{Write a gem description}
gem.summary = %q{Write a gem summary}
gem.homepage = ""
@akoumjian
akoumjian / gist:3156940
Created July 21, 2012 19:45 — forked from baijum/gist:3025019
Salt Development Environment
## Get OS/build dependancies
$ sudo apt-get install python2.7-dev build-essential libtool autoconf automake swig uuid-dev python-m2crypto python-setuptools
## Download 0MQ
$ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
## Unpack
$ tar -xvzf zeromq-2.2.0.tar.gz
## CD into dir
@baijum
baijum / gist:3025019
Created June 30, 2012 18:41
Salt Development Environment
## Get OS/build dependancies
$ sudo apt-get install python2.7-dev build-essential libtool autoconf automake swig uuid-dev python-m2crypto
## Download 0MQ
$ wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
## Unpack
$ tar -xvzf zeromq-2.2.0.tar.gz
## CD into dir