Skip to content

Instantly share code, notes, and snippets.

View schlauberg's full-sized avatar

miri schlauberg

View GitHub Profile
@rustymyers
rustymyers / postflight
Created September 26, 2011 16:04
CreateUserLion fix for ARD
#!/usr/bin/python
#
# Payload free package to create a user on a 10.7 system.
import sys
import os
import re
import time
import subprocess
@glarizza
glarizza / gist:1445481
Created December 8, 2011 00:24
OS X Lion Password Hash Instructions

Password Hash Accessing:

  • Grab plist file from /var/db/dslocal/nodes/Default/users/username.plist

  • Convert to xml

      plutil -convert xml1 username.plist
    
  • Grab the ShadowHashData key and base64 decode it (install base64 with port install base64)

      echo "Data from ShadowHashData Key" | base64 -d > ShadowHashData
    
  • Convert the resultant binary plist file into xml

@tungel
tungel / my Arch Linux cheat-sheet
Created July 8, 2013 13:42
I have kind of short term memory so I like to take note of what I've done. This cheat-sheet log some of the things I've done to my Arch Linux machine. Lots of these stuffs are based on my personal preference and may not be applicable to you. Also take note that: I'm not responsible if you break your machine by following any of the steps in this …
Installing Arch:
sudo vim /etc/pacman.conf
Update packages list: sudo pacman -Syy
run sudo pacman -Syu before installing any software (to update the repositories first)
* Timing issue:
- Change hardware clock to use UTC time:
sudo timedatectl set-local-rtc 0
@bqm
bqm / findMeetupWaitlistPosition.js
Last active April 6, 2023 15:40
Find your position in a meetup.com waitlist
// Open the developer console of your favorite browser
// on the page of your favorite meetup where you're on the wailist (grrr)
// and paste this by putting your name
// This will actually compute the position in the waitlist div which seems to correspond to the waitlist position
var findPosition = function(username) { return $("#rsvp-list-waitlist h5").map(function(i, el) {return {"pos": i, "name": $(el).text()}}).filter(function(i, el) {return el["name"].indexOf(username) >= 0;})}
findPosition("my displayed name") // where my displayed name is the name that is displayed for you on the meetup
@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@qslabs
qslabs / gist:0a4647eafb3896910d03
Created March 19, 2015 02:11
Quantified Self Slack Team - Code of Conduct
Quantified Self Labs is wholeheartedly dedicated to creating conferences and events, and online communities that are safe and comfortable for everyone involved. For us, this means providing a harassment-free experience for every community member regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, or religion.
Harassment includes offensive verbal comments related to gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, race, religion, sexual images in public spaces, deliberate intimidation, stalking, following, harassment, sustained disruption, inappropriate contact, and unwelcome sexual attention. We think it is obvious – but not too obvious to state – that our commitment to supporting our community extends to the entire Quantified Slack experience, including direct messages and private groups.
We are committed to addressing these issues, so if you are being harassed or notice somebody
@jaceklaskowski
jaceklaskowski / deployment-tool-ansible-puppet-chef-salt.md
Last active January 3, 2024 22:12
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@josh-padnick
josh-padnick / fish-agent.sh
Last active July 6, 2024 11:20
Run ssh-agent via fish shell
#!/bin/bash
#
# Convert ssh-agent output to fish shell
#
eval "$(ssh-agent)" >/dev/null
echo "set SSH_AUTH_SOCK \"$SSH_AUTH_SOCK\"; export SSH_AUTH_SOCK"
echo "set SSH_AGENT_PID \"$SSH_AGENT_PID\"; export SSH_AGENT_PID"
@dougvk
dougvk / Dockerfile
Last active January 27, 2020 20:28
Building Urbit with Docker
FROM ubuntu:latest
RUN apt-get update -y && apt-get install -y \
libgmp3-dev libsigsegv-dev openssl libssl-dev \
libncurses5-dev git make exuberant-ctags automake autoconf libtool \
g++ ragel cmake re2c curl
RUN git clone https://github.com/urbit/urbit /urbit
WORKDIR /urbit