Skip to content

Instantly share code, notes, and snippets.

@max107
max107 / index.js
Created November 23, 2015 17:24
easy-react-router
export { default as Router } from './router';
export { default as Link } from './link';
export { default as Store } from './store';
@max107
max107 / userChrome.css
Created July 16, 2015 15:51
Firefox userChrome.css wild old tabs
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
* {
font-size: 12px !important;
font-family: Ubuntu, "Lucida Grande", "Helvetica Neue", Arial, sans-serif !important;
}
/* Remove space before first tab */
.tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
-moz-padding-end: 0 !important;
@max107
max107 / calendar.js
Last active August 29, 2015 14:20
React calendar
var Calendar = React.createClass({
getDefaultProps: function() {
return {
prev_text: "Prev",
next_text: "Next",
month_format: "MMMM, YYYY",
month: undefined,
count: 2,
reserved: [],
onSelect: function(date) {
@max107
max107 / main_window.py
Created April 28, 2015 15:53
Modified files
# -*- coding: utf-8 -*-
"""
This module contains the main window implementation.
"""
from __future__ import print_function
# from future.builtins import super
import mimetypes
import os
@max107
max107 / del.js
Created March 30, 2015 09:41
Delete all wall posts from
var h = document.getElementsByClassName("post_actions");
var i = 0;
function del_wall() {
var fn_str = h[i].getElementsByTagName("div")[0].onclick.toString();
var fn_arr_1 = fn_str.split("{");
var fn_arr_2 = fn_arr_1[1].split(";");
eval(fn_arr_2[0]);
if (i == h.length) {
clearInterval(int_id)
@max107
max107 / cn_tw_korea
Created March 17, 2015 13:39
CN, TW, KOREA ip list
1.0.1.0/24
1.0.2.0/23
1.0.8.0/21
1.0.32.0/19
1.1.0.0/24
1.1.2.0/23
1.1.4.0/22
1.1.8.0/21
1.1.16.0/20
1.1.32.0/19
<?php
function main() {
$data = [1 => 1, 2 => 2, 3 => 3];
foreach($data as $key => $value) {
yield $key, $value;
}
}
foreach(main() as $key => $value) {
@max107
max107 / 1
Created February 4, 2015 13:25
1
Server Software:
Server Hostname: studio107.ru
Server Port: 80
Document Path: /
Document Length: 20083 bytes
Concurrency Level: 20
Time taken for tests: 4.745 seconds
Complete requests: 150
@max107
max107 / sshd.go
Last active August 29, 2015 14:11 — forked from jpillora/sshd.go
// A simple SSH server providing bash sessions
//
// Server:
// cd my/new/dir/
// ssh-keygen -t rsa #generate server keypair
// go get -v .
// go run sshd.go
//
// Client:
// ssh foo@localhost -p 2022 #pass=bar
/**
* Return the value of any protected class variable.
*
* // Get the response parameters
* $params = $response->params;
*
* @param string variable name
* @return mixed
*/
public function __get($key)