Skip to content

Instantly share code, notes, and snippets.

View stpettersens's full-sized avatar

Sam Saint-Pettersen stpettersens

View GitHub Profile
@stpettersens
stpettersens / php_with_openssl.sh
Last active July 6, 2018 23:23
SSL libraries for building PHP with OpenSSL support.
sudo apt-get install libssl-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev
@stpettersens
stpettersens / .vimrc
Last active October 24, 2016 22:26
My Vim configuration.
set nocompatible " be iMproved (required)
filetype off " (required)
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle (required)
Plugin 'VundleVim/Vundle.vim'
@stpettersens
stpettersens / caddyphp.sh
Created October 17, 2016 20:10
Run Caddy with PHP.
#!/bin/sh
ulimit -n 8192
php-cgi -b 9000 | /opt/caddy/caddy
[package]
name = "ark_test"
version = "0.1.0"
authors = ["Sam Saint-Pettersen <[email protected]>"]
[dependencies]
ark = { git = "https://github.com/stpettersens/ark.git" }
@stpettersens
stpettersens / duolingo-autoplay-prompts.user.js
Last active August 20, 2018 23:11
User script to autoplay audio prompts on Duolingo.
// ==UserScript==
// @name Duolingo Autoplay audio
// @namespace 8442918f3dbd7268b7eabd74e1ce191e
// @version 0.1
// @description Autoplay the audio prompts on Duolingo.
// @author Sam Saint-Pettersen <[email protected]>
// @match https://www.duolingo.com/*
// @icon https://s32.postimg.org/8zxj3evit/duolingo.png
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
@stpettersens
stpettersens / packager.sh
Created July 17, 2016 16:55
Packager demo
packager -p io.stpettersen.yggdrasill.client -m YggdrasillClient -cp libs -r Client
@stpettersens
stpettersens / coolifier.js
Last active July 4, 2016 07:10
Coolifier example in JS (function which returns a function) [@vakila]
/*
Adapted from Anjana Vakil's (@vakila) Learning Functional Programming with JavaScript presentation @ JSUnconf 2016
https://youtu.be/e-5obm1G_FY?t=9m24s
*/
'use strict'
function makeAdjectifier (adjective) {
return function (string) {
return adjective + ' ' + string
@stpettersens
stpettersens / chrome_extensions.md
Last active August 15, 2016 22:35
Good Chrome/Vivaldi extensions and user scripts.

Chrome/Vivaldi extensions:

  • IP Whois & Flags Chrome & Websites Rating
  • Google Mail Checker
  • Send from Gmail (by Google)
  • Mailto: for Gmail™
  • Google Input Tools
  • PrettyPrint
  • XML Tree
  • JSONView
@stpettersens
stpettersens / atom_packages.md
Last active July 6, 2016 09:18
Packages to install on Atom.

Packages to install on Atom:

  • atom-jade
  • atom-handlebars
  • atom-typescript
  • language-typescript-grammars-only
  • language-rust
  • language-docker
  • language-ignore
  • color-picker
@stpettersens
stpettersens / startt.cmd
Created March 27, 2016 13:13
Start new window process wrappers
start %*