This file contains hidden or 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
pip3 install xkeysnail | |
sudo xkeysnail linux-map-key-remap.py | |
ln -s ~/xkeysnail.service /etc/systemd/system/xkeysnail.service | |
sudo systemctl enable xkeysnail |
This file contains hidden or 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
<Zone zones={[ | |
{ | |
id: 'pre', | |
start: { hours: 4, minutes: 0, seconds: 0 }, | |
end: { hours: 9, minutes: 30, seconds: 0 }, | |
fill: "#999999", | |
opacity: 0.1, | |
startLine: { | |
stroke: '#3d7cd4', | |
strokeWidth: 1, |
This file contains hidden or 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
# | |
# Use just this: | |
openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ | |
-keyout server.key \ | |
-new \ |
This file contains hidden or 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
JS_PATH = "app/assets/javascripts/**/*.js"; | |
Dir[JS_PATH].each do |file_name| | |
puts "\n#{file_name}" | |
puts Uglifier.compile(File.read(file_name)) | |
end |
This file contains hidden or 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
## | |
# Stick an Object in the queue. | |
# Delayed::Job.enqueue(DelayedRake.new("util:mongrel_init:name")) | |
require 'rake' | |
require 'fileutils' | |
class DelayedRake | |
def initialize(task, options = {}) |
This file contains hidden or 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/sh | |
### BEGIN INIT INFO | |
# Provides: bluepill | |
# Required-Start: $local_fs $remote_fs $network $syslog $time | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: bluepill daemon, providing process monitoring | |
# Description: bluepill is a monitoring tool. More info at http://github.com/arya/bluepill. |
This file contains hidden or 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
# bluepill - process monitor | |
# | |
# simple process monitoring tool | |
description "bluepill: simple process monitoring tool" | |
start on runlevel [2345] | |
stop on runlevel [!2345] |
This file contains hidden or 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
db.test.update({foo: "bar"}, {$set: {test: "success!"}}, false, true); |
This file contains hidden or 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
class MoneyField | |
def mongoize | |
return if object.nil? | |
cents | |
end | |
class << self | |
def demongoize(object) | |
return nil unless object |
This file contains hidden or 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
# Copy: | |
# /etc/init/delayed_job.conf | |
# Execute: | |
# ln -s /lib/init/upstart-job /etc/init.d/delayed_job | |
# Change user name | |
description "Start up the delayed_job service" | |
start on runlevel [2345] | |
stop on runlevel [06] |