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
// ==UserScript== | |
// @name Redirect Medium posts to ReadMedium.com | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Redirect Medium posts to ReadMedium.com | |
// @author Llama 3 | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
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/bash | |
# Build docs for current package and all explicit dependencies | |
package=$(basename $(pwd)) | |
if [[ -z $1 ]] | |
then | |
packages=$(cargo metadata --format-version 1 | jq -r " .packages | .[] | select(.name == \"$package\") | .dependencies | map(.name) | join(\" \")") | |
else |
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
# Deploy and rollback on Heroku in staging and production | |
task deploy_staging: ['deploy:set_staging_app', 'deploy:push_staging', 'deploy:restart', 'deploy:tag'] | |
task deploy_production: ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
namespace :deploy do | |
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
task staging_migrations: [:set_staging_app, :push_staging, :off, :migrate, :restart, :on, :tag] | |
task staging_rollback: [:set_staging_app, :off, :push_previous, :restart, :on] |
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
rainux@kerrigan ~ | |
% YUKI.N> bonnie++ | |
Writing with putc()...done | |
Writing intelligently...done | |
Rewriting...done | |
Reading with getc()...done | |
Reading intelligently...done | |
start 'em...done...done...done... | |
Create files in sequential order...done. | |
Stat files in sequential order...done. |
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
" Highlight Ruby 1.8.x hash rocket | |
" This will prevent us to ever write it again | |
highlight ObsoleteHashRocket ctermbg=red guibg=red | |
au ColorScheme * highlight ObsoleteHashRocket guibg=red | |
au BufEnter * match ObsoleteHashRocket /\(:\w\+\s*\)\@<==>/ | |
au InsertEnter * match ObsoleteHashRocket /\(:\w\+\s*\)\@<==>/ | |
au InsertLeave * match ObsoleteHashRocket /\(:\w\+\s*\)\@<==>/ |
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
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'tmpdir' | |
Gems = %w(factory_girl rspec-core capybara remarkable remarkable_activerecord) | |
output_dir = Dir.pwd | |
Dir.mktmpdir do |tmpdir| |
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
require 'rubygems' | |
require 'eventmachine' | |
require 'twitter/json_stream' | |
module Twitter | |
class JSONStream | |
def unbind | |
# The override just added a call to puts | |
puts '==unbind' | |
receive_line(@buffer.flush) unless @buffer.empty? |
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
rainux@immortal ~/devel/twi_meido | |
% YUKI.N> ruby d.rb | |
user system total real | |
0.770000 0.020000 0.790000 ( 0.802016) | |
0.730000 0.000000 0.730000 ( 0.740943) | |
0.760000 0.020000 0.780000 ( 0.793928) | |
user system total real | |
1.160000 0.010000 1.170000 ( 1.182798) | |
1.230000 0.030000 1.260000 ( 1.268377) |
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
V/network ( 4846): server started | |
W/CameraSwitch( 4846): open main camera | |
W/CameraSwitch( 4846): no file - can't switch camera | |
D/CameraService( 1354): CameraService::connect E (pid 4846, client 0x7dc88) | |
D/CameraService( 1354): Client::Client E (pid 4846) | |
D/QualcommCameraHardware( 1354): createInstance: E | |
D/QualcommCameraHardware( 1354): Storing the current target type as 2 | |
D/QualcommCameraHardware( 1354): constructor EX | |
D/QualcommCameraHardware( 1354): startCamera E |
NewerOlder