sudo apt-get install python3-pip
sudo pip3 install virtualenv
.ProseMirror[data-placeholder]::before { | |
color: global.$placeholder-colour; | |
position: absolute; | |
content: attr(data-placeholder); | |
pointer-events: none; | |
} |
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a |
package ffmpeg | |
import ( | |
"bytes" | |
"context" | |
"io" | |
"os" | |
"os/exec" | |
"strings" | |
"testing" |
// $ node queue <file name or youtube URL> | |
const net = require('net') | |
let client = net.connect(1234, 'localhost') | |
client.on('connect', function () { | |
if (process.argv[2]) { | |
console.log('Queueing ' + process.argv[2]) | |
client.write('queue.push smart:' + process.argv[2] + '\r\n') | |
} |
#!/bin/bash | |
USER=${1:-sebble} | |
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-) | |
PAGES=$((658/100+1)) | |
echo You have $STARS starred repositories. | |
echo |
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"net/url" | |
"golang.org/x/net/html" | |
"io" | |
) |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/codegangsta/negroni" | |
gh "github.com/google/go-github/github" | |
"github.com/gorilla/mux" |
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |