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
//-------------------------------------------------------------------------------- | |
#pragma mark - | |
#pragma mark GestureRecognizer | |
//-------------------------------------------------------------------------------- | |
// scale image depending on users pinch gesture | |
- (void)handlePinchGesture:(UIPinchGestureRecognizer *)recognizer | |
{ | |
NSLog(@"-------------------------------"); | |
NSLog(@"%s", __FUNCTION__); | |
NSLog(@"scale = %f", recognizer.scale); |
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
# あらかじめ「config/enviroments.rb」に | |
# Tilt::CoffeeScriptTemplate.default_bare = true | |
$ -> | |
setTimeout( | |
-> $('#notice').fadeOut('slow') | |
800 | |
) |
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
$ -> | |
setTimeout -> | |
$('#notice').faceOut 'slow', | |
800 |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'rest_client' | |
url = "http://localhost:5000/upload_file" | |
filename = File.expand_path('./test.jpg', File.dirname(__FILE__)) | |
f = File.new(filename, "rb") |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
def save_image(url, index) | |
suffix = 'jpg' if url.index('jpg') || url.index('jpeg') | |
suffix = 'png' if url.index('png') | |
suffix = 'gif' if url.index('gif') | |
open("/tmp/desktop#{index}.#{suffix}", 'wb') do |file| | |
open(url) do |data| |
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
# config data | |
#dir_path = '/home/hogemoge/' | |
# change dir | |
Dir.chdir(dir_path) | |
p Dir.pwd | |
analyze = Hash.new | |
Dir.open(dir_path).each_with_index do |f, index| |
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
#!/bin/perl | |
#$str = $_; | |
#$str =~ s/\[SQL\]/\033\[1;36m$&\033\[0m/g; | |
#$str =~ s/INSERT.+\n/\033\[1;32m$&\033\[0m/g; | |
#$str =~ s/SELECT.+\n/\033\[1;33m$&\033\[0m/g; | |
#print $str; | |
use strict; | |
use warnings; | |
while(<>) { |
NewerOlder