ドットインストールの CoffeeScript 入門より
http://dotinstall.com/lessons/basic_coffeescript
- JavaScript に変換可能な言語
- JavaScript に比べて…
- 使いやすい
- 書きやすい
// | |
// LaunchAtLoginController.h | |
// LaunchAtLoginController | |
// | |
// Created by Katsuma Tanaka on 2014/04/12. | |
// Copyright (c) 2014年 Katsuma Tanaka. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
@interface UIColor (HSBFunctions) | |
- (UIColor *)lightenedColorByPercent:(CGFloat)percent; | |
- (UIColor *)darkenedColorByPercent:(CGFloat)percent; | |
@end |
#!/bin/sh | |
# chkconfig: - 15 15 | |
# description: Copyright (C) yosida95 All Right Reserved. | |
. /etc/rc.d/init.d/functions | |
SUPERVISORD="/usr/bin/supervisord" | |
PIDFILE="/var/run/supervisord.pid" |
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
use epoll; | |
} |
#include <iostream> | |
#include <vector> | |
#include <cmath> | |
#include <limits.h> | |
#include <string> | |
#include <sstream> | |
using namespace std; |
#!/bin/bash | |
rew tap | sed -e "s/^/tap '/g" | sed -e "s/$/'/g" > Brewfile | |
brew list | sed -e "s/^/brew '/g" | sed -e "s/$/'/g" >> Brewfile |
curl 'https://api.github.com/users/questbeat/gists?page=1' | jq "." |
// iPadの場合にcontentのwidthを指定してやらないとdevice-width(768 or 1024)になってしまう | |
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { | |
NSString *script = [NSString stringWithFormat:@"document.querySelector('meta[name=viewport]').setAttribute('content', 'width=%d;', false); ", 320]; | |
[webView stringByEvaluatingJavaScriptFromString:script]; | |
} |
my $db = Intern::Diary::DBI::Factory->new; | |
my $dbh = $db->dbh('intern_diary'); | |
my $sth = $dbh->prepare(q[ | |
INSERT INTO entry | |
SET | |
user_id = ?, | |
title = ?, | |
content = ?, | |
draft = ?, |
ドットインストールの CoffeeScript 入門より
http://dotinstall.com/lessons/basic_coffeescript