This file contains 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
test=> SELECT sid, lid, COUNT(id) FROM attend GROUP BY sid, lid HAVING COUNT(id) > 1; | |
sid | lid | count | |
-----+---------+------- | |
336 | ACB0030 | 2 | |
325 | ABF0030 | 2 | |
(2 rows) | |
test=> SELECT id FROM attend WHERE sid = 336 AND lid = 'ACB0030'; | |
id | |
------- |
This file contains 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/bash | |
INTERVAL=5 | |
REBOOT_BORDER=10 | |
MAILTO="rudeboyjet@gmail.com" | |
LOG_DIR="/var/log/loadavg" | |
mkdir -p $LOG_DIR | |
while : | |
do | |
LOAD_AVG=$( uptime | awk '{print $10}' | cut -d "." -f 1 ) |
This file contains 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
jQuery ($) -> | |
new Vue( | |
el: '#app', | |
data: | |
msg: 'Hello Vue.js!' | |
) |
This file contains 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
class QuestsCleanupJob < ActiveJob::Base | |
queue_as :default | |
def perform(*args) | |
# Do something later | |
end | |
end |
This file contains 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
TARGET = serializer | |
CXX = clang++ | |
CC = clang | |
LDLIB_DIR = -I../../../zeron/cocos2d/cocos \ | |
-I../../../zeron/cocos2d/cocos/2d \ | |
-I../../../zeron/cocos2d/cocos/editor-support \ | |
-I../../../zeron/cocos2d/external/glfw3/include/mac \ | |
-I../../../zeron/cocos2d/extensions \ | |
-I../../../zeron/cocos2d/external \ |
This file contains 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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.12.2' | |
} | |
} | |
apply plugin: 'android' |
This file contains 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
private void clearPurchases() { | |
mHelper = new IabHelper(getContext(), "GOOGLE_TOKEN"); | |
mHelper.enableDebugLogging(true); | |
Log.v(TAG, "mHelper.startSetup"); | |
mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() { | |
public void onIabSetupFinished(IabResult result) { | |
if (!result.isSuccess()) { | |
// 失敗した時の処理 | |
} | |
List additionalSkuList = new ArrayList(); |
This file contains 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/bash | |
HEROKU="/home/yalab/.rvm/gems/ruby-1.9.3-p0/bin/heroku" | |
BACKUP_DIR="$HOME/.backup/mongohq" | |
if [ ! -d $BACKUP_DIR ];then | |
mkdir -p $BACKUP_DIR | |
fi | |
for APP in `$HEROKU list`;do | |
MONGOHQ_URL=`heroku config --app $APP | grep MONGOHQ_URL | awk '{print $3}'` |
This file contains 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
# stderr_to_stdout do | |
# warn("warning message") | |
# end | |
module Kernel | |
def stderr_to_stdout | |
old_std_err = STDERR.clone | |
STDERR.reopen(STDOUT) | |
yield | |
ensure |
This file contains 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/zsh | |
USER='yalab' | |
SOURCE_HOST='YOUR GLOBAL IP ADDRESS' | |
SOURCE_PORT=8888 | |
DEST_HOST='DESTINATION HOST IP ADDRESS' | |
DEST_PORT=22 | |
SSH_KEY='/home/yalab/.ssh/id_rsa' | |
sudo kill `ps ax | grep 'ssh -N'| awk '{print $1}'` |
OlderNewer