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
:⌉ | |
=⌉ | |
¦-) as opposed to | | |
☺ | |
☹ | |
☻ | |
⍣ | |
⍤ | |
⍥ om nom nom | |
⍨ |
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 | |
# File: flv_convert.sh | |
# Description: Converts flv files to ogv and mp4 | |
# | |
# Copyright 2009 George Ornbo (Shape Shed) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
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 cron = require('./cron'), sys = require('sys'); | |
cron.Every((2).seconds(), function() { sys.puts('Working!'); }); |
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 | |
# File: monitor_df.sh | |
# Description: Monitors disk usage and sends an email if limit reached | |
# | |
# Adapted from http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html | |
# | |
# Copyright 2009 George Ornbo (Shape Shed) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. |
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
# 内容は同じだけど履歴は違うけどブランチ master と two-phases を作る | |
% git init | |
Initialized empty Git repository in /private/tmp/myrepo/.git/ | |
% touch ab.txt | |
% git add ab.txt; git commit -m 'a empty file' | |
[master (root-commit) 7d9d5ea] a empty file | |
0 files changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 ab.txt | |
% echo 'A\nB' > ab.txt |
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
# subdomains.rake in /lib/tasks | |
namespace :subdomains do | |
desc "adds the necessary hosts to your /etc/hosts file from current subdomains in your application" | |
task :setup => :environment do | |
# NOTE: default_hosts is used as a locator for the line to update in /etc/hosts | |
tmp_file, changed = '/tmp/etc_hosts_copy', false | |
default_hosts, hosts = %w(blog.local emptyblog.blog.local), [] | |
# find all the subdomains used in your app (push to hosts array) - modify this to suit your app |
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
# create a thumbnail for a video with ffmpeg | |
ffmpeg -itsoffset -16 -i video.flv -vcodec mjpeg -vframes 1 -an -f rawvideo -s 142x94 thumbnail.jpg | |
# ... | |
video=video.flv; ffmpeg -itsoffset -16 -i $video -vcodec mjpeg -vframes 1 -an -f rawvideo -s 142x94 "`basename $video .flv`.jpg" | |
# remove last charater from filename of JPG files with filename ending in M | |
ls *M.jpg | while read line; do echo mv $line `echo $line | sed 's/\(.*\)M.jpg/\1.jpg/'`; 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
_________________________________________ | |
/ you really should just stay up and keep \ | |
\ drinking it / | |
----------------------------------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | | |
|| || |
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 | |
# File: batch_pngcrush.sh | |
# Description: Batch processes PNG files using the pngcrush | |
# http://pmt.sourceforge.net/pngcrush/ | |
# | |
# Copyright 2010 George Ornbo (Shape Shed) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML5 Form Elements</title> | |
<style> | |
body { padding:1em; } | |
</style> | |
</head> | |
<body> |