Skip to content

Instantly share code, notes, and snippets.

phistep / init.vim
Last active Nov 11, 2020
firenvim config
View init.vim
" """
" firenvim (browser textareas)
" unfortunately `if exists('g:started_by_firenvim')` doesn't work with
" laststatus and tabline. So we need to use the OnUIEnter function to set
" specific options
function! s:IsFirenvimActive(event) abort
if !exists('*nvim_get_chan_info')
return 0
phistep /
Last active Aug 14, 2020
Python glob example
# run as
# python3 test_dir
import os
import sys
import glob
import numpy as np
phistep /
Created Jul 23, 2020
Minimal Paramter Varying Batch Job Submission System
import argparse
import itertools as it
import os
import subprocess as sp
import multiprocessing as mp
parser = argparse.ArgumentParser(description="Run script for all combinations of arguments in parallel")
parser.add_argument('config', type=str, help="config file")
phistep / index.php
Last active May 5, 2020
Cook-Off Submission Site
View index.php
<title>Creative Cook-Off</title>
header {
text-align: center;
main {
margin: 0 auto;
width: 800px;
phistep / Makefile
Created Sep 7, 2015
premake Problems
View Makefile
# GNU Make workspace makefile autogenerated by Premake
ifndef config
ifndef verbose
phistep / .vimrc
Last active Dec 14, 2015
My Vim config
View .vimrc
" """""
" .vimrc
" v1.4.1
set nocompatible " be iMproved
" """
" Vundle
phistep / omilia_v1.0.0_to_v1.1.0_db_converter.rb
Last active Dec 14, 2015
Small script to migrate the database of [omilia]( from v1.0.0 to v1.1.0. It can easily be run directly from gist: $ ruby -e "$(curl"
View omilia_v1.0.0_to_v1.1.0_db_converter.rb
require 'net/http'
require 'cgi'
require 'json'
require 'data_mapper'
require './models/dataset'
require './models/user'
def set foo, bar
require './config'
#!/usr/bin/env bash
# Read more about this here:
if [[ $# -ne 2 ]]; then
echo "Usage: $0 path/to/target/dir <Number of files to create>"
for i in `seq 1 $2+1`; do
year=`shuf -i 1900-2012 -n 1`
month=`shuf -i 10-12 -n 1`
View mdbl0g-wordpress-importer.php
$outputdir = './mdbl0g-wp-import-posts';
$db = @new MySQLi('localhost', 'username', 'password', 'database');
/* *************************** */
if (mysqli_connect_errno())
die('MySQL error occured:'.mysqli_connect_error());