Skip to content

Instantly share code, notes, and snippets.

View selfawaresoup's full-sized avatar
💜

Esther Weidauer selfawaresoup

💜
View GitHub Profile
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@selfawaresoup
selfawaresoup / basics.clj
Last active January 13, 2016 21:35
Overview of Clojure syntax and some other basics
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;primitive types ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
42 ;;java.lang.Long
42.0 ;;java.lang.Double
"foo" ;;java.lang.String
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@selfawaresoup
selfawaresoup / screen.md
Last active August 29, 2015 14:12
Screen usage

Launch named session

screen -S <name>

Disconnect

C-a d

@graste
graste / index.html
Created September 15, 2014 21:37 — forked from anonymous/index.html
Selectbox custom styling
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
@lspector
lspector / notes.clj
Created February 4, 2014 17:23
Minimal example of how to play a melody using Clojure/Overtone/Leipzig
;; Minimal example of how to play a melody using Clojure/Overtone/Leipzig, based on code
;; at https://github.com/ctford/leipzig
;; by Lee Spector, lspector@hampshire.edu, 20140204
;; Add the following to your dependencies in project.cl, and do "lein deps" if your environment requires it:
;; [leipzig "0.7.0"]
(ns notes.core
(:use [leipzig melody scale live]
from lxml import etree
from copy import deepcopy
from math import ceil
itemsPerPage = 10
for inFile in ["episodes.all.m4a.rss", "episodes.all.mp3.rss"]:
xmlData = etree.parse(inFile)
@AvnerCohen
AvnerCohen / npm-cheat-sheet.md
Last active July 9, 2023 09:14
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

List of less common (however useful) NPM commands

Prepand ./bin to your $PATH

Make sure to export your local $PATH and prepand relative ./node_modules/.bin/: