在中国的创业团队中如何培养工程师文化: http://www.zhihu.com/question/20735690
豆瓣: http://www.douban.com/note/65095757/
设计原本 | |
黑客与画家 | |
代码质量 | |
技术领导之路 | |
布道之道 | |
rework | |
创业者手册 | |
深入理解计算机网络 |
#!/usr/bin/python | |
# -*- encoding: UTF-8 -*- | |
import codecs | |
import sys | |
from math import log | |
from collections import defaultdict | |
class Trie (object): | |
class TrieNode: |
Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8 (Jessie).
With minor modifications, this script can also be used on dedicated servers or any KVM- or XEN- based Virtual Private Server (VPS) from other providers.
Alternative VPN script for CentOS/RHEL
Original post by Thomas Sarlandie
/*jshint esnext:true*/ | |
// see https://gitlab.com/help/web_hooks/web_hooks for full json posted by GitLab | |
const NOTIF_COLOR = '#6498CC'; | |
const refParser = (ref) => ref.replace(/^.*?([^\/]+)$/,'$1'); | |
class Script { | |
process_incoming_request({request}) { | |
try { | |
switch(request.headers['x-gitlab-event']){ | |
case 'Push Hook': |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
#!/usr/bin/env python3 | |
# -*- encoding: utf-8 -*- | |
import time | |
from pymongo import MongoClient | |
from prometheus_client import start_http_server | |
from prometheus_client.core import GaugeMetricFamily, CounterMetricFamily, REGISTRY | |
from config.settings import MONGO_USER, MONGO_PASS, MONGO_URL, MONGO_DBNAME |
import gnsq | |
conn = gnsq.Nsqd(address='localhost', http_port=4151) | |
conn.publish('topic_name', 'hello gevent!') | |
conn.publish('topic_name', 'hello nsq!') |
from multiprocessing import Process | |
import time | |
import redis | |
# publish random message | |
def pub(myredis): | |
for n in range(10): | |
myredis.publish('channel_rand','blah %d' % n) | |
time.sleep(1) |
Download this file
chmod +x ./xps2pdf.bash
To convert a particular xps file: ./xps2pdf.bash thefile.xps
To convert all xps files in the current working directory: ./xps2pdf.bash *.xps