Skip to content

Instantly share code, notes, and snippets.

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree
You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf
clang: error: no input files
@@ -175,7 +175,7 @@ end
desc "Clean out caches: .pygments-cache, .gist-cache, .sass-cache"
task :clean do
- rm_rf [".pygments-cache/**", ".gist-cache/**", ".sass-cache/**", "source/stylesheets/screen.css"]
+ rm_rf [Dir.glob(".pygments-cache/**"), Dir.glob(".gist-cache/**"), Dir.glob(".sass-cache/**"), "source/stylesheets/screen.css"]
end
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom"
$ brew install sqlite expat
==> Installing sqlite dependency: readline
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6.3.8.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring readline-6.3.8.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X provides similar software, and installing this software in
parallel can cause all kinds of trouble.
<?php
$data = imagecreatefromgif('sample.gif');
imagejpeg($data, 'convertgifimage.jpg');
from PIL import Image
im = Image.open('sample.gif').convert('RGB').save('convertfromgif.jpg')
<script type="text/javascript">
$(document).ready(function(){
var loaded_items = 0;
$(".loadmore_button").click(function(){
loaded_items = $(".app_list").length;
$.get('/index.php/app/loadmore/'+loaded_items, function(data){
$('.app_list').append(data);
});
})
})
#coding:utf-8
import random
seq = (True, False)
print random.choice(seq)
@kamatari
kamatari / install.sh
Created December 4, 2014 06:56
install the_silver_searcher
$ apt-get install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev
$ git clone https://github.com/ggreer/the_silver_searcher.git
$ cd the_silver_searcher
$ ./build.sh
$ sudo make install
test_list = [(1,1),(1,2),(1,3),(1,4),(1,5)]
for coordinate in test_list:
for c_point in test_list:
print 'compare_point ' + str(c_point)
test_list.remove(c_point)
print test_list
# output
'''
compare_point (1, 1)
@kamatari
kamatari / filemtime_error.php
Last active August 29, 2015 14:14
codeigniter template error of application/third_party/smarty/libraries/sysplugins/smarty_resource.php
// http://php.net/manual/ja/function.filemtime.php
//$compiled->timestamp = @filemtime($compiled->filepath);
$compiled->timestamp = exec ('stat -c %Y '. escapeshellarg ($compiled->filepath));
//ERROR - 2015-02-02 16:00:30 --> Severity: Warning --> filemtime(): stat failed for application/views/templates_c/xxxxxxxx.file.index.tpl.php /home/kamatari/web/xxxx/application/third_party/smarty/libraries/sysplugins/smarty_resource.php 744