View convert-mod-track-to-video.sh
#!/bin/bash
#
# Record a video of a mod/s3m/xm tracker song played using milkytracker.
#
# Dependencies with versions used in parenthesis:
#
# schismtracker / milkytracker
# pulseaudio
# vnc2flv
# turbovnc
View xfce4-save-session.sh
#!/bin/sh
exec dbus-send \
--session \
--dest=org.xfce.SessionManager \
--print-reply /org/xfce/SessionManager \
org.xfce.Session.Manager.Checkpoint string:""
View FeedBackToolGithub.js
/* https://github.com/eisnerd/feedback-tool + github issues
Example:
$.feedbackGithub({
token: "16222221222128357fab95ec80b56a43c9a1868b429",
issues: {
repository: "tokland/feedback-test",
title: "feedback from user",
renderBody: (body) => "my own data\n" + body,
View promise_map.js
function promiseMap(xs, f) {
const reducer = (ysAcc$, x) =>
ysAcc$.then(ysAcc => f(x).then(y => ysAcc.push(y) && ysAcc));
return xs.reduce(reducer, Promise.resolve([]));
}
/* Example */
const axios = require('axios');
View data-entry-contentscript.js
/*
Group subsections tabs (with names "section@subsection1", "section@subsection2") into a single tab "section"
Save as a contentscript in DHIS2 app customJS/CSS (https://www.dhis2.org/download/appstore/customjscss.zip)
*/
var init = function(contentEl) {
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var displayingTabs = contentEl.children().size() > 0;
var observer = new MutationObserver(function(mutations, observer) {
if (!displayingTabs && contentEl.children().size() > 0) {
View Gemfile
source "https://ruby.taobao.org"
ruby "2.3.0"
gem "activesupport"
gem "togglv8"
gem "awesome_print"
gem "trollop"
group :development do
View functional_virtual_dom_simple_demo.html
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es">
<head>
<title>Simple functional app using VirtualDom</title>
<script src="http://wzrd.in/standalone/virtual-dom@latest"></script>
<script src="simple_virtual_dom.js"></script>
<script src="incrementor.js"></script>
</head>
<body>
<div id="incrementor">
View datatables-colreorder-async.html
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es">
<head>
<title>Testing DataTable/ColOrder with async call</title>
<script src="http://code.jquery.com/jquery-1.12.4.js"></script>
<script src="http://nightly.datatables.net/js/jquery.dataTables.min.js"></script>
<script src="http://nightly.datatables.net/colreorder/js/dataTables.colReorder.js"></script>
<script>
$(document).ready(function() {
var table = $('#example').DataTable({
View google-timeline-download.sh
#!/bin/bash
set -e -u -o pipefail
join_by() { local IFS="$1"; shift; echo "$*"; }
date_range() { local from=$1 to=$2
local days=$((($(date '+%s' -d "$to") - $(date '+%s' -d "$from")) / (60*60*24)))
seq 0 $days | while read days_offset; do
date -d "$from + $days_offset days" "+%Y-%m-%d"
done
View control-deezer-webplayer.js
// ==UserScript==
// @name DeezerCLI
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Control Deezer web player from the console
// @author pyarnau@gmail.com
// @match http://www.deezer.com/*
// @grant none
// ==/UserScript==