Skip to content

Instantly share code, notes, and snippets.

@poc7667
poc7667 / run_process_with_grep.py
Created February 13, 2014 02:47
run_process_with_grep and can get the output of shell script
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import argparse
import re
import os
import time
import string
@poc7667
poc7667 / exifs
Created March 14, 2014 09:43
pixnet_hackthon
{
"uploaded_at": "1391184927",
"taken_at": "1387432875",
"exif": {
"Camera": "Sony Ericsson - ST18i",
"ISOSpeedRatings": 80,
"DateTime": "2014:02:01 00:08:59",
"DateTimeOriginal": "2013:12:19 14:01:15",
"DateTaken": "2013:12:19 14:01:15",
"MeteringMode": "CenterWeightedAverage",
@poc7667
poc7667 / acoounting
Last active August 29, 2015 13:57
sample city json
56940,12215,11210,10171,4216,9147,2957,6659,2036,3016,2396,934,1110,2497,1572,1773,1828
@poc7667
poc7667 / lala.rb
Created March 16, 2014 09:18
lala
#!/usr/bin/ruby
$i = 0
$num = 5
while $i < $num do
puts("Inside the loop #$i = #{$i}" )
# $i +=1 # $i = $i + 1
# $i = $i + 2
$i += 1
end
@poc7667
poc7667 / application.html
Created March 19, 2014 06:33
integration gmaps4rails
<!DOCTYPE html>
<html>
<head>
<title>Gooodshot</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
</head>
<body>
@poc7667
poc7667 / tsmc_a.m
Created March 19, 2014 13:48
tsmc_a.m
im = imread( './sample.jpeg' );
imshow( im, [] );
x = [ 50, 80 ];
y = [ 50, 80 ];
[ M ] = improfile( im, x, y );
D = 1 : length( M );
plot( ...
D, M( :, :, 1 ), 'r' ...
, D, M( :, :, 2 ), 'g' ...
@poc7667
poc7667 / test.m
Created March 27, 2014 16:08
matlab
a = [1:3]
c = [4:6]
d = [7:9]
ans=[a;c;d]
@poc7667
poc7667 / gitlab.yml
Created April 1, 2014 03:06
Can not new project on Git lab
# # # # # # # # # # # # # # # # # #
# GitLab application config file #
# # # # # # # # # # # # # # # # # #
#
# How to use:
# 1. copy file as gitlab.yml
# 2. Replace gitlab -> host with your domain
# 3. Replace gitlab -> email_from
production: &base
@poc7667
poc7667 / ace-theme-folder-structure
Created April 3, 2014 06:00
undefined error in less file put under assets
.
├── ace-fonts.css
├── ace-ie.min.css
├── ace-rtl.min.css
├── ace-skins.min.css
├── ace.min.css
├── application.css
├── bootstrap-editable.css
├── bootstrap-timepicker.css
├── bootstrap.min.css
@poc7667
poc7667 / check status
Last active August 29, 2015 13:58
gitlab failed with nginx
git@dqa-Veriton-M6620G:~/gitlab$ sudo -u git -H bash -l -c "rake gitlab:check RAILS_ENV=production"
2014-04-03T06:17:55Z 15706 TID-14fud2 INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379", :namespace=>"resque:gitlab"}
Checking Environment ...
Git configured for git user? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...