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 copy | |
import os | |
import random | |
import subprocess | |
import tracemalloc | |
pid = os.getpid() | |
buffer = b"0" * 100000000 | |
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
// Copyright (c) 2013 Hiroyuki Tanaka | |
// Released under the MIT license | |
#include <stdint.h> | |
#include <cstdlib> | |
#include <cstring> | |
#include <string> | |
#include <map> | |
#include <vector> | |
#include <iostream> |
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 datetime | |
import calendar | |
import time | |
# utctime -> localtime | |
utcnow = datetime.datetime.utcnow() | |
local = datetime.datetime.fromtimestamp(calendar.timegm(utcnow.timetuple())) | |
# localtime -> utctime | |
localnow = datetime.datetime.now() |
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
cd ~/Library/Application Support/Sublime Text 2/Packages/Python | |
cp Python.tmLanguage Python3.tmLanguage |
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 functools | |
class MyException(Exception): | |
def __init__(self, original, *args, **kwargs): | |
super(MyException, self).__init__(str(original), *args, **kwargs) | |
self.original = original | |
def raise_as(except_classes, target_class): | |
def wrapper(f): | |
@functools.wraps(f) |
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
GET http://cdn.optimizely.com/js/52738645.js qiita.com:18 | |
GET http://cdn.mxpnl.com/libs/mixpanel-2.1.min.js qiita.com:30 | |
(anonymous function) qiita.com:30 | |
(anonymous function) qiita.com:31 | |
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:235 | |
chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:235 | |
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:235 | |
chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:235 | |
Unsafe JavaScript attempt to access frame with URL http://platform.twitter.com/widgets/tweet_button.1352365724.html#_=1353924677122&count=horizontal&id=twitter-widget-0&lang=ja&original_referer=http%3A%2F%2Fqiita.com%2F&size=m&text=Qiita%5B%E3%82%AD%E3%83%BC%E3%82%BF%5D%20-%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9E%E3%81%AE%E6%8A%80%E8%A1%93%E6%83%85%E5%A0%B1%E5%85%B1%E6%9C%89%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9&url=http%3A%2F%2Fqiita.com%2F&via=Qiita_jp from frame with URL http://qiita.c |
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
(1..3).map {|x| x * 2} # => [2, 4, 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
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$("a").click(function() { | |
alert("Hello world"); | |
}); | |
}); | |
</script> |