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
/* | |
http://blog.hawn.be/2011/10/07/how-to-force-youtube-to-use-expanded-view-by-default-and-even-larger/ | |
*/ | |
div#watch-player.flash-player, | |
div#watch-player.html5-player, | |
div#watch-video { | |
width: 854px !important; height: 510px !important; | |
/* width: 970px !important; height: 580px !important; */ | |
/* width: 1280px !important; height: 765px !important; */ |
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
alias cd="mycd" | |
function mycd() { | |
\cd $1 | |
if [ $? == 0 ]; then | |
restore_aliases | |
if [ -e ".bashrc.local" ]; then | |
save_aliases | |
source .bashrc.local | |
fi | |
fi |
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 remove rubbish | |
// @namespace http://www.hekt.org/ | |
// @include http://dailynews.yahoo.co.jp/fc/sports/* | |
// ==/UserScript== | |
(function() { | |
var rs = [ | |
"日刊ゲンダイ", | |
"夕刊フジ", |
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
;; add css vendor prefixes | |
(defun add-css-vendor-prefixes (start end) | |
(interactive "r") | |
(replace-regexp | |
"\\([\s\t]*\\)\\(\\(?:.\\|\n\\)+;\\)" | |
"\\1-webkit-\\2\n\\1-moz-\\2\n\\1-ms-\\2\n\\1-o-\\2\n\\&" | |
nil start end)) | |
(defun add-css-vendor-prefixes-to-value (start end) | |
(interactive "r") | |
(replace-regexp |
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
for f in "$@" | |
do | |
/usr/local/bin/convert -crop 486x331+647+408 "$f" "$HOME/Dropbox/Photos/Borderlands Weapons/${f##*/}" | |
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
(function() { | |
var urls = ['http://b.hatena.ne.jp/entry/', | |
'http://zenback.itmedia.co.jp/contents/', | |
'http://ceron.jp/url/']; | |
chrome.tabs.onUpdated.addListener(function(tabid, inf, tab) { | |
for (var i = 0; i < urls.length; i++) { | |
if (inf.url.indexOf(urls[i]) === 0) { | |
var newUrl = inf.url.replace(/^(https?:\/\/).*?\/.*?\/(.*)$/, '$1$2'); | |
chrome.tabs.update(tabid, {"url": newUrl}); |
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
function jsLoader() { | |
"use strict"; | |
var scripts = [].slice.call(arguments); | |
var reserves = []; | |
var thisScript = document.scripts[0] || document.querySelector("script"); | |
var head = thisScript.parentNode; | |
if ("async" in thisScript) | |
parallel(); |
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
import Foundation | |
class LotteryEntry: NSObject { | |
var entryDate: NSDate | |
var firstNumber: Int | |
var secondNumber: Int | |
init(initWithEntryDate theDate: NSDate) { | |
entryDate = theDate | |
firstNumber = random() % 100 + 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
import Cocoa | |
@NSApplicationMain | |
class AppDelegate: NSObject, NSApplicationDelegate { | |
@IBOutlet weak var window: NSWindow! | |
@IBOutlet weak var textField: NSTextField! | |
let speechSynth = NSSpeechSynthesizer(voice: nil) |
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
import Cocoa | |
@NSApplicationMain | |
class AppDelegate: NSObject, NSApplicationDelegate { | |
@IBOutlet weak var window: NSWindow! | |
@IBOutlet weak var textField: NSTextField! | |
@IBOutlet weak var textLabel: NSTextField! |