Skip to content

Instantly share code, notes, and snippets.

sudo mkdir /mnt/root
#on 64bit
sudo mount -t ext4 /dev/sda1 /mnt/root
#on 32bit
sudo mount -t ext3 /dev/sda1 /mnt/root
sudo mount -t proc none /mnt/root/proc
sudo mount -o bind /dev /mnt/root/dev
@mandymozart
mandymozart / CCMidiTest
Created June 14, 2012 12:34
Controller Change MidiTest with RWMidi for Korg NanoKontrol & NanoPad (y axis malfunctioning
import rwmidi.*;
MidiInput nanoCntrl, nanoPad;
void setup() {
// Midi
// Show available MIDI output devices here
MidiInputDevice devices[] = RWMidi.getInputDevices();
for (int i = 0; i < devices.length; i++) {
println(i + ": " + devices[i].getName());
@mandymozart
mandymozart / translation.json.twig
Last active December 20, 2015 12:19
parse this file for translations
{# TODO: for each locale #}
<script>
{
translations: [
{
abstraction: "payment.subscribe.step2.terms.text",
lang: "en",
translation: "I accept"},
{
abstraction: "payment.subscribe.step2.terms.text",
@mandymozart
mandymozart / date_picker.dart - Class CalendarDates
Created November 13, 2015 14:29
This class can be used to store additional information about dates, like timespans, etc. at the moment it is not implemented in the date_picker
/** Can store data for further Calendar interactions like timespans, extended information for individual dates.
* Not used for now
**/
class CalendarDates extends JsProxy {
@reflectable
List years = [];
static const maxYear = 2018;
<dom-module id="mixin-grid">
<template>
<style is="custom-style">
:root {
/* Basics */
--grid: {
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
@mandymozart
mandymozart / docker-common-cli-commands.bash
Last active March 27, 2017 09:00
docker common CLI commands
# Stop all containers
docker stop $(docker ps -a -q)
# Remove all containers
docker rm $(docker ps -a -q)
# Remove all images
docker rmi $(docker images -q)
# Any running containers
docker ps -a
docker images
@mandymozart
mandymozart / git-filter-branch-prune-large-files.sh
Created August 9, 2017 12:05
Remove large file from repository - prune files with filter
git filter-branch --prune-empty -d /dev/shm/scratch \
--index-filter "git rm --cached -f --ignore-unmatch oops.iso" \
--tag-name-filter cat -- --all
@mandymozart
mandymozart / parentCuid.ts
Created November 8, 2017 15:00
Extend controller for parent event bubbling
/**
* Attache publish bindings for event manager
* TODO requires EventManager to be injected into each controller on factory
* [data-publish] {string} message
* [data-payload]? {string} payload (TODO maybe json or object)
* [data-event]? {ZeptoEventHandlers} @default click
* focusin focusout focus blur load resize scroll unload click dblclick
* mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave
* change select keydown keypress keyup error
*/
@mandymozart
mandymozart / api-search.js
Created July 5, 2018 13:31
Docsify Plugin : Api Search
(function () {
"use strict";
let INDEX = {};
let criteria = {};
const bindDropdown = (type) => {
const $fieldFilterByType = Docsify.dom.find("aio-select.aio-" + type);
if ($fieldFilterByType) {