Skip to content

Instantly share code, notes, and snippets.

View kjunichi's full-sized avatar

Junichi Kajiwara kjunichi

View GitHub Profile
@bmeck
bmeck / starttls.js
Created April 26, 2011 15:15 — forked from TooTallNate/starttls.js
Upgrade a regular `net.Stream` connection to a secure `tls` connection.
// Target API:
//
// var s = require('net').createStream(25, 'smtp.example.com');
// s.on('connect', function() {
// require('starttls')(s, options, function() {
// if (!s.authorized) {
// s.destroy();
// return;
// }
//
@javan
javan / gist:1168475
Created August 24, 2011 16:32
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
@nobonobo
nobonobo / checkloc.py
Created August 3, 2012 00:03
「「wi-fi の情報をつかって位置情報を得る」をPythonでやってみた」をOSX対応にした。
import sys
from subprocess import Popen, PIPE
import json
import requests
if sys.platform=='linux':
iwlist = Popen('iwlist wlan0 scan'.split(), stdout=PIPE)
grep = Popen('grep Address:'.split(),
stdin=iwlist.stdout, stdout=PIPE)
awk = Popen(['awk', '{print $5}'],
@edvakf
edvakf / smc.c
Created November 10, 2012 01:13
SMC
/*
* Apple System Management Control (SMC) Tool
* Copyright (C) 2006 devnull
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@nobonobo
nobonobo / singleproc.py
Created November 21, 2012 04:03
多重起動禁止処理 for Windows
import sys
import win32api
import win32security
import win32event
import win32gui
sa = win32security.SECURITY_ATTRIBUTES()
sa.SECURITY_DESCRIPTOR.SetSecurityDescriptorDacl(True, None, False)
# saを指定しておかないと別のユーザで起動したときにMutexが衝突しなくなる
mutex = win32event.CreateMutex(sa, False, 'unique-string...')
err = win32api.GetLastError()
@imaya
imaya / jser.md
Created March 17, 2014 02:00
JavaScript プログラマの職種は4種類くらいに分けるべき

はじめに

JavaScript を使っていると「JavaScript出来るの? jQuery / AngularJS / Node.js etc... で困ってるんだけどさー」みたいな話を振られることがあります。 そういった時に、自分は一般的なライブラリの使い方やフレームワークに対して大した知見も興味もないので、わざわざ説明するのも面倒なのでこうして文章にしておきます。(本当に届いて欲しい人に限って、こういう文章が届かないのはわかっていますが、文章を書くこと自体が気晴らしだと思って諦めます。)

「フロントエンドエンジニア」という言葉の汎用性

先ほどのような話は自分に限ったことではなく、たぶん経験のある人も多いでしょう。 振られた話が自分の分かる範囲、あるいは興味のあるものならばまだ良いのですが、そうでないことがあまりに多すぎます。 話を振られるだけならともかく「JavaScriptできるんでしょ? じゃあ jQuery つかったこのサービスのメンテしてほしいんだけどー」みたいに仕事として振られることもあり、そう言う時は脳みそ取り出して洗剤で洗った方が良いのでは、と思うことも多々あります。

いかにして我々はフロントエンドに秩序をもたらそうとしてきたか

@mizchi / Quipper

最初に

  • 人間性捧げすぎて資料作るの忘れてました

@yusuke
yusuke / gist:a00646e8bfaa9092c3c1
Last active August 29, 2015 14:05
ボリュームをリモートでコントロールするjsp
<%@ page language="java" contentType="text/html; charset=UTF-8" session="false"%><html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title>online volume controller</title>
</head>
<body><%request.setCharacterEncoding("UTF-8");
String volume = request.getParameter("volume");
try{
int volumeInt = Integer.parseInt(volume);
volumeInt = volumeInt < 0 ? 0 : volumeInt;
@mala
mala / a.md
Last active June 30, 2020 15:13
Chrome ExtensionのLive HTTP Headersの調査(CoolBar.Pro導入 Extensionが何を行うかの調査)

Chrome ExtensionのLive HTTP Headersを調査した。Firefox用のものではない。Firefox用のものではない。

11/7追記

English version: https://translate.google.com/translate?sl=ja&tl=en&js=y&prev=_t&hl=ja&ie=UTF-8&u=https%3A%2F%2Fgist.github.com%2Fmala%2Fe87973df5029d96c9269d9431fcef5cb&edit-text=&act=url

Summary in english.