Skip to content

Instantly share code, notes, and snippets.

View yosmoc's full-sized avatar

Yoshihisa Mochihara yosmoc

  • IKEA IT AB
  • Sweden
View GitHub Profile
for i in ./*.pdf;do rake SRC=$i SIZE="658x905" LEVEL='0%,93%,0.7' UPDATE_METADATA=1 POSTFIX=kindle; rake clean SRC=$i; done
@yosmoc
yosmoc / d
Last active October 9, 2015 01:18
#!/bin/sh
$EDITOR tmp.md && cat tmp.md | dayone new && rm tmp.md
#!/bin/sh
echo 'Rails is not currently installed on this system. To get the latest version, simply type:'
echo
echo ' $ sudo gem install rails'
echo
echo 'You can then rerun your "rails" command.'
require 'net/http'
require 'uri'
class KindleIt
def initialize(email)
@email = email
@account, @domain = @email.split('@')
end
def post(url)
$('#fusion_ad').hide();
$('ul.footer').hide();
var confy = require ('confy')
confy.get('twitter.com', { require: {
username: '',
password: ''
}}, function(err, result) {
console.log(result);
});
express = require('express')
app = express.createServer()
app.get('/',
(req, res) -> res.send("helloworld")
)
port = process.env.PORT || 3000
#!/usr/bin/env php
<?php
if ( 1 == $argc ) {
exitWithError("usage: " . $argv[0] . " [work | play]");
}
$whoami = trim(`whoami`);
if ( 'root' != strtolower($whoami) ) {
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Last.fm</string>
<key>CFBundleIdentifier</key>
<string>fm.last.Last.fm</string>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>10J869</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>