This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When /^the process job workers run$/ do | |
while job = Resque.reserve(:data_extraction_process_queue) | |
job.perform | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//var io = require('socket.io'); | |
var express = require('express') | |
, stylus = require('stylus') | |
, http = require('http') | |
, nib = require('nib'); | |
var app = express(); | |
var server = http.createServer(app); | |
var io = require('socket.io').listen(server); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* - nofile 65535 | |
mongod - nproc 65535 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mongod - Startup script for mongod | |
# chkconfig: 35 85 15 | |
# description: Mongo is a scalable, document-oriented database. | |
# processname: mongod | |
# config: /etc/mongod.conf | |
# pidfile: /var/run/mongo/mongo.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return-limits(){ | |
for process in $@; do | |
process_pids=`ps -C $process -o pid --no-headers | cut -d " " -f 2` | |
if [ -z $@ ]; then | |
echo "[no $process running]" | |
else | |
for pid in $process_pids; do | |
echo "[$process #$pid -- limits]" | |
cat /proc/$pid/limits | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# override these variables in ~/.vagrant.d/Vagrantfile for your local changes | |
$local_username ||= `whoami`.strip | |
$local_projects_directory ||= "~/projects/vagrant/" | |
$vm_memory ||= "4096" | |
$vm_cpus ||= "4" | |
$server_root_password = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using terms from application "Mail" | |
on perform mail action with messages theMessages for rule theRule | |
tell application "Mail" | |
set theText to "This AppleScript is intended to be used as an AppleScript rule action, but is also an example of how to write scripts that act on a selection of messages or mailboxes." & return & return & "To view this script, hold down the option key and select it again from the Scripts menu." | |
repeat with eachMessage in theMessages | |
set theSubject to subject of eachMessage | |
set theBody to content of eachMessage | |
try | |
-- If this is not being executed as a rule action, | |
-- getting the name of theRule variable will fail. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yajl' | |
require 'mongo' | |
speedtest_json = `/path/to/speedtest-cli --json` | |
begin | |
if speedtest_json.nil? or speedtest_json == "" | |
raise Yajl::ParseError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
gems = `gem list` | |
puts "source https://rubygems.org" | |
gems.each_line{|line| | |
(gem, versions) = line.split(' ') | |
highest_version = versions.split(',').first.gsub(/[\(\)]/, '') | |
puts "gem '#{gem}', '#{highest_version}'" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n -e "\033]0;$1\007" |
OlderNewer