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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
itemcount=0 | |
subcount=1 | |
for a in `ls G*.JPG 2> /dev/null` | |
do | |
echo "$a" | |
lastproduct="$productid" | |
productid=`echo "$a" | gawk '{print substr($a, 9,6)}'` |
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
@echo off | |
rem smail.exe installation required | |
set pdfpath=%1 | |
set smailpath="exeplace" | |
set smtp=smtp.gmail.com | |
set from=hoge@gmail.com | |
set to="hoge@gmail.com" | |
for /f "delims=;" %%i in ('dir /b /od %pdfpath%\*.pdf') do ( |
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
#! /usr/bin/sh | |
INPUT_FILE=data1 | |
OUTPUT_FILE=data2 | |
awk -c ' | |
BEGIN { | |
FS = "\t" # TAB chara fow win platform | |
OFS = "\t" | |
REC_N = 15 # column number |
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
-- 取り込み用ローデータの削除 | |
DELETE [r_tbl]; | |
-- データの取り込み実施 | |
BULK INSERT [r_tbl] from 'raw.txt' WITH | |
( | |
FIELDTERMINATOR = '\t', | |
ROWTERMINATOR = '0x0a' | |
); |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import pymssql | |
#DB接続 | |
conn = pymssql.connect(host='server', user='user', password='pass', database='dbname') | |
cur = conn.cursor() | |
#ストアド・プロシージャ実行 | |
v_sql = 'exec [dbo].[importer]' |
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 | |
# 各種設定:パスワードはパラメータから取得 | |
HOST=hoge | |
USER=fuga | |
PASS=fugafuga | |
TARGET_DIR=/home/user/xxx/ | |
BACKUP_DIR=/home/user/xxx/ | |
SCRIPT_DIR=/home/user/script/ |
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
import com.flurry.android.FlurryAgent; | |
@Override | |
protected void onStart() | |
{ | |
super.onStart(); | |
FlurryAgent.onStartSession(this, "YOUR_API_KEY"); | |
} | |
@Override |
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
#import "Flurry.h" | |
- (void)applicationDidFinishLaunching:(UIApplication *)application | |
{ | |
[Flurry startSession:@"YOUR_API_KEY"]; | |
//your code | |
} |
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
#import "Flurry.h" | |
- (void)applicationDidFinishLaunching:(UIApplication *)application | |
{ | |
[Flurry startSession:@"YOUR_API_KEY"]; | |
//your code | |
} |