From Metaphox for Metaphox
- XCode
xcode-select --install- iTerm2 http://iterm2.com/
| %w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g} | |
| require File.join(File.dirname(__FILE__), "downmark_it") | |
| module WordPress | |
| def self.import(database, user, password, table_prefix = "wp", host = 'localhost') | |
| db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8') | |
| %w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder} |
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*-# | |
| import smtplib, time, urllib2 | |
| from bs4 import BeautifulSoup | |
| from email.mime.text import MIMEText | |
| def mailme(message): | |
| msg = MIMEText(message) | |
| msg['Subject'] = 'German Consu Termin!' | |
| msg['From'] = '[email protected]' |
| # requires root permissions in /usr/bin/ | |
| star = String.new | |
| 8.times { star += "*" } | |
| Star = "\n#{star * 3}\n" | |
| def newblock string | |
| puts "\n#{Star}#{string}#{Star}\n" | |
| end |
| var user = { | |
| validateCredentials: function (username, password) { | |
| return ( | |
| (!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
| : (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
| : (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
| : (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
| : (!/^([a-z0-9-_]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
| : false | |
| ); |
| [ | |
| { | |
| "keys": ["alt+w"], | |
| "command": "toggle_setting", | |
| "args": | |
| { | |
| "setting": "word_wrap" | |
| } | |
| } | |
| ] |
| //以下は、c でも c++ でも同じ。 | |
| //X(x) になってるところは全て警告orエラーになる。 | |
| // http://d.hatena.ne.jp/cicupo2/ | |
| void foo(void*x){} | |
| #define C const | |
| #define X(x) /* x */ | |
| int main() |
| DCPU-16 Specification | |
| Copyright 1985 Mojang | |
| Version 1.7 | |
| === SUMMARY ==================================================================== | |
| * 16 bit words | |
| * 0x10000 words of ram |
From Metaphox for Metaphox
xcode-select --install| /* Times New Roman-based stack */ | |
| font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
| /* Modern Georgia-based serif stack */ | |
| font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; | |
| /* Traditional Garamond-based serif stack */ | |
| font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif; | |
| /* Helvetica/Arial-based sans serif stack */ |
| NSString *myAudioFileInBundle = @"words.mp3"; | |
| NSTimeInterval wordStartsAt = 1.8; | |
| NSTimeInterval wordEndsAt = 6.5; | |
| NSString *filePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:myAudioFileInBundle]; | |
| NSURL *myFileURL = [NSURL fileURLWithPath:filePath]; | |
| AVAudioPlayer *myPlayer = [[AVAudioPlayer alloc]initWithContentsOfURL:myFileURL error:nil]; | |
| if (myPlayer) { | |
| [myPlayer setCurrentTime:wordStartsAt]; | |
| [myPlayer prepareToPlay]; | |
| [myPlayer play]; |