Skip to content

Instantly share code, notes, and snippets.

View mxmilkiib's full-sized avatar
🔊

Milkii Brewster mxmilkiib

🔊
View GitHub Profile
@rsvp
rsvp / soundcloud-mp3.js
Created March 9, 2012 02:54 — forked from pheuter/sc-dl.js
SoundCloud bookmarklet that generates link to download MP3
/**
2012-03-26 Forked from duncanbeevers' sc-dl.js : https://gist.github.com/2157987
**/
(function(document) {
var link = document.createElement("a"),
span = document.createElement("span"),
slug = document.querySelector("#main-content-inner img[class=waveform]").src.match(/\.com\/(.+)\_/)[1],
mp3 = document.querySelector("em").innerText + ".mp3";
@antillas21
antillas21 / sites.php
Created April 16, 2012 21:23
Steps to take Drupal site out of multi-site install
<?php
$sites = array(
'sitename.com' => 'sitename.com',
// the first sitename.com in the file, refers to the url content in the browser's window,
//you may/probably should replace this with a FQDN.
// the second sitename.com appearing after '=>' is the directory name inside sites/ where
//the site files are stored.
);
@mxmilkiib
mxmilkiib / createdb.sh
Created July 21, 2012 04:14
createdb.sh
#!/bin/bash
EXPECTED_ARGS=3
E_BADARGS=65
MYSQL=`which mysql`
Q1="CREATE DATABASE IF NOT EXISTS $1;"
Q2="GRANT ALL ON *.* TO '$2'@'localhost' IDENTIFIED BY '$3';"
Q3="FLUSH PRIVILEGES;"
SQL="${Q1}${Q2}${Q3}"
@chriseppstein
chriseppstein / 0_content_block_scoping.scss
Created August 12, 2012 23:28
This gist demonstrates how global and local variables work with mixin content blocks in Sass.
$global: one;
@mixin foo {
$local: 1;
$mixin-local: true;
global-before-content: $global;
mixin-local-before-content: $local;
@content;
@evilmarty
evilmarty / README.md
Created October 25, 2012 07:39
Sass vendor helper mixins

If like me you find it frustrating to define the same vendor prefixes over and over again. Sure, you might create mixins that help reduce the amount of repetitiveness but when your mixins file becomes a library (or not) you see so many lines of near-identical code and wonder if there is an easier way.

Say you have this (all-too familiar) mixin:

@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  -ms-border-radius: $radius;
 -o-border-radius: $radius;
@tef
tef / ersatz.bibimbap.rst
Last active December 21, 2015 02:19
try not to poison yourself with this weird old tip

ersatz bibimbap

bibimbap as i make it is basically

  • rice
  • sitr fried vegetables
  • some meat in tasty spices
  • gochujang (this is fermented soy bean paste with paprika)
  • a fried egg
@oumu
oumu / soundcloud-mp3.js
Created March 31, 2012 00:49 — forked from rsvp/soundcloud-mp3.js
SoundCloud bookmarklet that generates link to download MP3
/**
2012-03-26 Forked from duncanbeevers' sc-dl.js : https://gist.github.com/2157987
**/
(function(document) {
var link = document.createElement("a"),
span = document.createElement("span"),
slug = document.querySelector("#main-content-inner img[class=waveform]").src.match(/\.com\/(.+)\_/)[1],
mp3 = document.querySelector("em").innerText + ".mp3";
# kcbanner's zshrc file v0.1, based on:
# jdong's zshrc file v0.2.1 and
# mako's zshrc file, v0.1
setopt ALL_EXPORT
# Set/unset shell options
setopt notify globdots correct pushdtohome cdablevars autolist
setopt correctall autocd recexact longlistjobs nohup incappendhistory sharehistory extendedhistory
setopt autoresume histignoredups pushdsilent menucomplete
@joshkersey
joshkersey / wordpress_setup.sh
Created May 15, 2012 17:25
WordPress setup Bash script
#!/bin/bash
# Installation script for a Wordpress 3.0 website on Ubuntu 10.04
#
# Josh Kersey
# Created: May 15, 2012
# Last Update: June 13, 2012
# get setup parameters
echo "apache vhost name (one word):"
@mxmilkiib
mxmilkiib / m_ctrl.py
Last active July 1, 2018 06:11
mididings script - scene_1 maps nanokontrol2 s/m/r button leds to the first three rows in seq64. subscenes of scene_2 are for channel strip effects.
#!/usr/bin/env python
# m_ctrl.py - mididings things
# scene_1 maps s/m/r buttons to seq64 pattern grid
# scene_2 to map control to a channel strip
# http://dsacre.github.io/mididings/doc/genindex.html
from mididings import *
# for sending LED scene changes