This file contains hidden or 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/sh | |
# kill already process | |
PROC=`pgrep -f inotifywait` | |
if [ -n "${PROC}" ]; then | |
echo $PROC | xargs kill | |
fi | |
/usr/bin/inotifywait -e create,modify -mrq /home/my.file | while read line; do | |
path=`echo $line | /bin/awk '{print $1$3}'` |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>index</title> | |
<meta name="viewport" content="width=device-width; initial-scale=1.0" /> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { |
This file contains hidden or 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
var WebSocket = require('websocket').server, | |
Net = require('net'), | |
http = require('http'), | |
Dgram = require('dgram'), | |
unixPath = '/tmp/wsbroadcaster.sock', | |
unixSocket, | |
udpSocket, | |
wsServer, | |
httpServer; |
This file contains hidden or 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
(function() { | |
var pointerMatrix = [ | |
[1,3,5,7,9,11,13,15,17,19,21,23], | |
[49,51,53,55,57,59,61,63,65,67,69,71], | |
[97,99,101,103,105,107,109,111,113,115,117], | |
[145,147,149,151,153,155,157,159,161,163,165], | |
[193,195,197,199,201,203,205,207,209,211,213], | |
[241,243,245,247,249,251,253,255,257,259,261] | |
]; | |
var rubMap = { |
This file contains hidden or 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
(function(module) { | |
"use strict"; | |
// Scope stacks | |
var LAZY_ID = 0, | |
PARALLELS = []; | |
// exports | |
module.Lazy = Lazy; |
This file contains hidden or 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/sh | |
echo '玉子とじラーメン 650円(大盛800円)' | |
echo '玉子とじ担々麺 800円(大盛980円)' | |
echo 'もやしそば 750円(大盛980円)' | |
echo 'ワンタンメン 750円(大盛980円)' | |
echo '叉焼麺 800円(大盛980円)' | |
echo '天津麺 750円(大盛980円)' | |
echo '五目そば 750円(大盛980円)' | |
echo '酸辣湯麺 850円(大盛1000円)' |
This file contains hidden or 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
grep '^[ユーザ名]:' /etc/passwd |
This file contains hidden or 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 ruby | |
require 'date' | |
require 'json' | |
require 'net/http' | |
response = Net::HTTP.get URI('http://ntp-a1.nict.go.jp/cgi-bin/json') | |
json = JSON.parse(response) | |
diff = json['st'] - Time.now.to_i |
This file contains hidden or 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
// | |
// SWebSocket.cpp | |
// | |
// Created by Yoshiaki Sugimoto on 2014/08/04. | |
// | |
// | |
#include "SWebSocket.h" | |
USING_NS_CC; |
This file contains hidden or 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
#include "network/HttpRequest.h" | |
#include "network/HttpClient.h" | |
#include "network/HttpResponse.h" | |
using namespace cocos2d::network; | |
HttpRequest* request = new HttpRequest(); | |
request->setUrl("http://example.com/external/image.png"); | |
request->setRequestType(HttpRequest::Type::GET); | |
request->setResponseCallback([this](HttpClient *sender, HttpResponse *response) { |
OlderNewer