Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
ryanflorence / static_server.js
Last active July 21, 2024 12:43
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@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
@mandiwise
mandiwise / Count lines in Git repo
Last active July 4, 2024 16:56
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@minniel
minniel / slack_history.py
Last active February 28, 2022 22:02 — forked from Chandler/slack_history.py
Download Slack Channel/PrivateChannel/DirectMessage History
from slacker import Slacker
import json
import argparse
import os
import shutil
import copy
from datetime import datetime
# This script finds all channels, private channels and direct messages
# that your user participates in, downloads the complete history for
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 23, 2024 19:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@drcmda
drcmda / index.jsx
Last active November 15, 2022 20:05
react-spring with react-native
import React from 'react'
import { StyleSheet, Text, View, TouchableWithoutFeedback } from 'react-native'
import { Spring, animated } from 'react-spring/dist/native'
const styles = {
flex: 1,
margin: 0,
borderRadius: 35,
backgroundColor: 'red',
alignItems: 'center',