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
require("./evil"); | |
var cURL = require("./curl").cURL; | |
exports.TwitterOAuth = function (consumerKey, consumerSecret) { | |
this.consumerKey = consumerKey; | |
this.consumerSecret = consumerSecret; | |
var parent = this; | |
this.BaseClass = function (token, tokenSecret) { | |
this.token = token; |
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
var crypto = require("crypto"); | |
var Evil = new Object(); | |
const NONCE_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; | |
Evil.getNonce = function (charsLength) { | |
var result = new String(); | |
for (var i = 0; i < charsLength; i++) { |
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
var spawn = require("child_process").spawn; | |
exports.cURL = function (url, method) { | |
this.url = url; | |
this.method = method; | |
this.query = new Object(); | |
this.param = new Array(); | |
this.access = function (callback) { |
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
// 全置換:全ての文字列 org を dest に置き換える | |
String.prototype.replaceAll = function (org, dest){ | |
return this.split(org).join(dest); | |
} | |
var str = "なんとかかんとか" | |
str = str.replaceAll("とか", "だか"); | |
console.log(str); | |
// > なんだかかんだか |
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
#include <stdio.h> | |
int main (void) { | |
int i, foo, bar, flg; | |
foo = bar = 0; | |
for (i = 1; i <= 100; i++) { | |
flg = 0; | |
foo++; |
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
#include <stdio.h> | |
int main (void) { | |
int i, foo, bar; | |
foo = bar = 0; | |
for (i = 1; i <= 100; i++) { | |
printf("%d\r", i); | |
foo++; |
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
var fs = require("fs"), | |
connect = require("./lib/connect"), | |
ejs = require("./lib/ejs"); | |
var templates = new Object(); | |
function routing(app) { | |
app.get("/list", function(req, res){ | |
var body = new String(); | |
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
var http = require('http'); | |
var reqbody = 'reqbody=' + encodeURIComponent('あいう漢字'); | |
var localhost = http.createClient(3000, 'localhost'); | |
var request = localhost.request('POST', '/', | |
{ | |
'host': 'localhost', | |
'Content-Type': 'application/x-www-form-urlencoded', | |
'Content-Length': reqbody.length |
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
/* | |
* =====node.jsでマルコフ連鎖とか===== | |
* | |
* 汚いソースコードだけどちゃんと文は作れるみたい。 | |
* 同ディレクトリに text.txt を作って適当な文章を書くといいです。 | |
* 吉野家コピペとかTwitterから拝借したつぶやきとか。 | |
* ※そのうちTwitterからつぶやきを拝借するプログラムを書くかもしれませんが期待しないでください | |
* | |
* 自分のソフトウェアに組み込んじゃってもいいし、変更してもいいです。 | |
* あ、でもまったく変更せずに「わしが育てた」はナシで。 |
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 node | |
/* | |
* node tcpTester.js で立ち上げて、始めに、 | |
* host port encoding(utf-8) SSL_Enable(false) | |
* で接続します。 | |
* あとは行ベースでゴニョゴニョ。 | |
* | |
* 紹介/利用はご自由に。ご利用は自己責任で。著作権は @KOBA789 に帰属します。 | |
* なにかあれば @KOBA789 まで。 |
OlderNewer