Skip to content

Instantly share code, notes, and snippets.

require 'formula'
class Autoconf < Formula
url 'http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz'
homepage 'http://www.gnu.org/software/autoconf/'
sha1 'e4826c8bd85325067818f19b2b2ad2b625da66fc'
def install
system "./configure", "--program-suffix=213",
"--prefix=#{prefix}",
"--infodir=#{info}"
FFMPEG=/opt/ffmpeg-live/bin/ffmpeg
for((;;))
do
sleep 1
FILENAME=stat123_for_eng_$(date +"%H%M%S").mp3
echo "save audio into " $FILENAME
$FFMPEG -f avfoundation -i ":0" -vn -acodec mp3 -b:a 96k -ar 44100 $FILENAME
done
The MIT License (MIT)
Copyright (c) 2013 Jamar Parris
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE S
$ bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
$ source ~/.gvm/scripts/gvm
$ gvm install go1.4
$ gvm use go1.4
$ gvm install go1.7.4
$ gvm use go1.7.4
@devopstaku
devopstaku / gitlab-backup.sh
Created February 3, 2017 00:11 — forked from avence12/gitlab-backup.sh
A script to backup GitLab repositories.
#!/bin/bash
# A script to backup GitLab repositories.
GLAB_BACKUP_DIR=${GLAB_BACKUP_DIR-"gitlab_backup"} # where to place the backup files
GLAB_TOKEN=${GLAB_TOKEN-"YOUR_TOKEN"} # the access token of the account
GLAB_GITHOST=${GLAB_GITHOST-"gitlab.com"} # the GitLab hostname
GLAB_PRUNE_OLD=${GLAB_PRUNE_OLD-true} # when `true`, old backups will be deleted
GLAB_PRUNE_AFTER_N_DAYS=${GLAB_PRUNE_AFTER_N_DAYS-7} # the min age (in days) of backup files to delete
GLAB_SILENT=${GLAB_SILENT-false} # when `true`, only show error messages
GLAB_API=${GLAB_API-"https://gitlab.com/api/v3"} # base URI for the GitLab API
@devopstaku
devopstaku / static_server.js
Created February 18, 2017 02:18 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@devopstaku
devopstaku / Timings.txt
Created July 2, 2017 13:48 — forked from jasonroelofs/Timings.txt
Using Go for embarrassingly parallel scripts
] wc -l domains.txt
783 domains.txt
] time go run domain_lookup_parallel.go
real 0m5.743s
user 0m0.359s
sys 0m0.355s
] time go run domain_lookup_sequential.go