Skip to content

Instantly share code, notes, and snippets.

@tamj0rd2
tamj0rd2 / robbyrussell-custom.zsh-theme
Last active April 15, 2021 14:50 — forked from tomcoakes/gist:9cfd2c8f2ab27bac2da04919b754a239
display current stack in prompt but only make call when changing directory
get_pulumi_info() {
CONFIG_FILE_NAME="Pulumi.yaml"
CONTAINING_FOLDER="$(pwd)"
while [[ "$CONTAINING_FOLDER" != "" && ! -e "$CONTAINING_FOLDER/$CONFIG_FILE_NAME" ]]; do
CONTAINING_FOLDER="${CONTAINING_FOLDER%/*}"
done
YAML_FILE="${CONTAINING_FOLDER}/${CONFIG_FILE_NAME}"
if [[ -f "$YAML_FILE" ]]; then
WORKSPACE_NAME="$(cat $YAML_FILE | grep name: | head -1 | sed 's/name: //g ')"
// Church numeral encoding
const ZERO = f => x => x
const increment = n => f => x => n(f)(x)
// do not try to understand this. This way madness lies...
const decrement = n => f => x => n(g => h => h(g(f)))(u => x)(u => u)
// we're going to keep this simple for now, but trust me that booleans are also an interface...
@echo off
if exist running exit
cd /d "%userprofile%\Downloads\"
set channel=continuous
set url=https://storage.googleapis.com/chromium-browser-%channel%/Win_x64
set wget=wget -N
type nul > running
if "%1" == "" (
%wget% %url%/LAST_CHANGE || goto hell
fc LAST_CHANGE LastVersion && goto hell
@tamj0rd2
tamj0rd2 / subreddit-data-dumper.py
Last active September 21, 2016 13:04 — forked from quentinms/subreddit-data-dumper
A python script that gets the list of the most popular subreddits
import json
import os
import requests
import time
def write_to_file(data, **kwargs):
'''Writes a string to a file'''
global json_file_path
end = kwargs.pop('end', False)
@tamj0rd2
tamj0rd2 / subreddit_array.py
Last active September 21, 2016 13:03 — forked from sauravtom/subreddit_array.py
Python script to generate a list of subreddits
import json
import os
import requests
import time
def write_to_file(data, **kwargs):
'''Writes a string to a file'''
global json_file_path
end = kwargs.pop('end', False)