Skip to content

Instantly share code, notes, and snippets.

View zachwhaley's full-sized avatar
🐳
Hi!

Zachary Whaley zachwhaley

🐳
Hi!
View GitHub Profile
@ryin
ryin / tmux_local_install.sh
Last active July 13, 2024 00:42
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@skyscribe
skyscribe / .gdbinit
Created October 30, 2012 03:04
GDB init file to print STL containers and data members
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
anonymous
anonymous / solution.java
Created December 4, 2012 19:18
Facebook hiring questions
import java.util.*;
public class Solution{
public final static int MAX_NUMBER_OF_STATES = 390625;//5^8
class State{
int steps;
int[] conf;
int peg1, peg2;
int prev;
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@anowell
anowell / git-ship
Last active May 29, 2020 07:32
A git script to accommodate my workflow of merging (or rebasing) a particular feature branch into master: pull master, optionally rebase the feature branch, merge back to master, push, and finally remove branch.
#!/bin/sh
#
# My workflow:
# git checkout -b myfeature
# ...edit stuff...git commit...edit stuff...git commit...ready to ship...
# git ship myfeature -rpd
#
# It exits if the merge or rebase requires intervention,
# for merge: fix the conflict, commit the merge, and re-run the git ship command
# for rebase: clean up the conflict, run `git rebase --continue` and then re-run the git ship command
@konklone
konklone / Makefile
Created October 10, 2014 14:19
building openssl with FIPS
#
all: test
openssl-fips-2.0.8.tar.gz:
wget http://www.openssl.org/source/openssl-fips-2.0.8.tar.gz
openssl-1.0.1i.tar.gz:
wget http://www.openssl.org/source/openssl-1.0.1i.tar.gz
@jamescmartinez
jamescmartinez / slack_delete.rb
Last active May 28, 2024 15:00
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active July 19, 2024 17:32
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@jackcarter
jackcarter / slack_delete.py
Last active November 29, 2023 07:03
Delete Slack files older than 30 days. Rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@Graham42
Graham42 / map-filter-reduce-example.groovy
Last active May 25, 2022 16:48
Groovy example for map, filter, reduce
// In Groovy
// collect = "map"
// inject = "reduce"
//
// See http://docs.groovy-lang.org/next/html/documentation/working-with-collections.html for docs
////////////////////////////////////////////////////////////////////////////////
// Arrays
def myNumbers = [3, 5, 1]