Skip to content

Instantly share code, notes, and snippets.

@hakopako
hakopako / sentinel-sqlite.sql
Last active Sep 18, 2017
(php) sentinel - sqlite version schema
View sentinel-sqlite.sql
# @see https://github.com/cartalyst/sentinel/blob/2.0/schema/mysql.sql
# Dump of table activations
# ------------------------------------------------------------
CREATE TABLE activations (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
code TEXT NOT NULL,
completed INTEGER DEFAULT '0',
completed_at TEXT NULL DEFAULT NULL,
@hakopako
hakopako / 00_readme.md
Last active May 15, 2017
fabric(python) light framework.
View 00_readme.md

required

  • python2.7 pyenv install 2.7.10 && pyenv virtualenv 2.7.10 python2
  • cd fabric && pyenv local python2
  • fabric pip install fabric

Exec

$ fab -H localhost deploy:config/hogehoge.json,skip_test=True

View reference-check.md

QUESTIONS:

1 - What were the main duties and responsibilities carried out by him/her?

彼(女)が主にやってた業務や案件

2 - Please give us your comments on the level of his/her technical skills and ability to perform the specific duties associated with his/her role?

彼(女)の技術レベルはどう? 仕事のパフォーマンスはどう?

@hakopako
hakopako / MyCheckButton.swift
Last active Oct 13, 2016
Check/Radio button, extend class of UIButton.
View MyCheckButton.swift
class MyCheckButton: UIButton {
var baseColor:UIColor = UIColor.lightGray
private var isMulti:Bool = false
private let frameShapeLayer:CAShapeLayer = CAShapeLayer()
private let checkShapeLayer:CAShapeLayer = CAShapeLayer()
private let framePath:UIBezierPath = UIBezierPath()
private let checkPath:UIBezierPath = UIBezierPath()
private let margin:CGFloat = 16
private let lineWidth:CGFloat = 2
View aaaaa.md

hoge

barbarbarbar. hugahuga.

@hakopako
hakopako / entrypoint.rb
Last active Jun 8, 2016
itamae entrypoint.rb sample
View entrypoint.rb
node["recipes"] = node["recipes"] || []
host_name = node[:hostname] # SpecinfraというGemを利用しているらしい
host_group = host_name[/(.+)([0-9]){4}/, 1 ] # 号機を除いたホスト名 ex.) hogehoge0001 -> hogehoge
proxy_host = "bar"
proxy_port = "1234"
# 実行環境
if host_name.index("-dev") != nil then
env = "dev"
elsif host_name.index("-test") != nil then
@hakopako
hakopako / 00_linuxcmd.md
Last active Mar 11, 2018
ほんとうによくわすれる
View 00_linuxcmd.md

linuxcmd

status

  • loadavg $ sar -q

connection

  • tcpのみ1秒ごとに表示 $ netstat -nt 1
View 1_git_tutorial.md

Git

ファイルのバージョン(リビジョン)を管理してくる仕組みの1つ。
他にはsubversionとかがある。
github や bitbucket は git にソーシャルな仕組みを付け加えたサービス名を指す。

簡単に仕組みを

バージョン管理したいフォルダ(リポジトリ)がローカルPCとクラウドの両方にある感じ。

View command.txt
# yum install -y glib2.i386 qt4.i386 zlib.i386 alsa-lib.i386 libX11.i386 libXv.i386 libXScrnSaver.i386
# yum install -y xorg-x11-xauth xorg-x11-server-Xvfb x11vnc Xorg
# yum install -y python-setuptools
# easy_install Skype4Py
# easy_install ctypes
# cd /opt
# wget http://download.skype.com/linux/skype_static-2.1.0.47.tar.bz2
# tar jxvf skype_static-2.1.0.47.tar.bz2
# ln -s skype_static-2.1.0.47 skype
View gist:7dae4079510d9492e67a
/usr/bin/ld: skipping incompatible /usr/pgsql-9.3/lib/libpq.so when searching for -lpq
$ ld -lpq --verbose
You can’t perform that action at this time.