Skip to content

Instantly share code, notes, and snippets.

View gutenye's full-sized avatar
:octocat:
Guten tag!

Guten gutenye

:octocat:
Guten tag!
View GitHub Profile
@gutenye
gutenye / gist:9757635
Last active August 29, 2015 13:57
javascript basic
a = function() {
console.log(1)
}
a() // run it
console.log(2)
// 同步的 结果是
// 1
// 2
@gutenye
gutenye / gist:9733735
Created March 24, 2014 03:39
database query
Started GET "/api/v1/channels?featured=true&auth_token=BzbsZNWneZPToi95GryR&channel_id=-1" for 127.0.0.1 at 2014-03-24 11:38:28 +0800
Processing by Api::V1::ChannelsController#index as JSON
Parameters: {"featured"=>"true", "auth_token"=>"BzbsZNWneZPToi95GryR", "channel_id"=>"-1"}
User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."authentication_token" = 'BzbsZNWneZPToi95GryR' LIMIT 1
(0.3ms) BEGIN
SQL (0.9ms) UPDATE "users" SET "last_sign_in_at" = $1, "current_sign_in_at" = $2, "sign_in_count" = $3, "updated_at" = $4 WHERE "users"."id" = 2 [["last_sign_in_at", Mon, 24 Mar 2014 03:38:28 UTC +00:00], ["current_sign_in_at", Mon, 24 Mar 2014 03:38:28 UTC +00:00], ["sign_in_count", 865], ["updated_at", Mon, 24 Mar 2014 03:38:28 UTC +00:00]]
(3.2ms) COMMIT
Channel Load (1.2ms) SELECT "channels".* FROM "channels" WHERE "channels"."featured" = 't' AND (author_id = 2 OR (accessible_to_all = 't' AND approved = 't'))
Page Load (0.7ms) SELECT "pages".* FROM "pages" WHERE "pages"."channe
@gutenye
gutenye / gist:9410589
Last active August 29, 2015 13:57
wget both http and https website after/before stronvpn connection.
#
# without strongvpn, direct connect
#
/tmp ❯ wget http://www.engadget.com/
--2014-03-07 20:23:07-- http://www.engadget.com/
Resolving www.engadget.com (www.engadget.com)... 207.200.74.123
Connecting to www.engadget.com (www.engadget.com)|207.200.74.123|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
@gutenye
gutenye / gist:9410464
Last active August 29, 2015 13:57
strongvpn log. by openvpn
Fri Mar 7 19:24:27 2014 OpenVPN 2.3.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [eurephia] [MH] [IPv6] built on Nov 13 2013
Fri Mar 7 19:24:27 2014 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Fri Mar 7 19:24:27 2014 Control Channel Authentication: tls-auth using INLINE static key file
Fri Mar 7 19:24:27 2014 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Mar 7 19:24:27 2014 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Fri Mar 7 19:24:27 2014 Socket Buffers: R=[212992->131072] S=[212992->131072]
Fri Mar 7 19:24:27 2014 UDPv4 link local: [undef]
Fri Mar 7 19:24:27 2014 UDPv4 link remote: [AF_INET]68.68.33.126:123
Fri Mar 7 19:24:27 2014 TLS: Initial packet from [AF_INET]68.68.33.126:123, sid=dd58390e 0e1906fb
Fri Mar 7 19:24:30 2014 VERIFY OK: depth=1, C=US, ST=CA, L=San-Francisco, O=reliablehosting.co
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libtorrent configure 0.13.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/usr --disable-dependency-tracking --disable-debug CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing -Wno-conversion-null -std=c++11 PKG_CONFIG_PATH=:/opt/qt/lib/pkgconfig --no-create --no-recursion
## --------- ##
## Platform. ##
@gutenye
gutenye / ember-with-middleman.md
Last active December 10, 2015 01:58
Write Ember.js App With Middleman

I. Create a Middleman project with middleman-ember-template

$ middleman init hello --template=ember

II. Install ember.js package

$ bower install ember
hello
2
@gutenye
gutenye / gist:3732175
Created September 16, 2012 12:08
ttf-ms-win8 PKGBUILD
# Maintainer: reflexing <reflexing@reflexing.ru>
#
# BUILD INSTRUCTIONS:
# ----------------------
# This package is based on 'ttf-win7-fonts' package with fixes,
# suggested by AUR's 'severach' user in comments.
#
# It is intended as a more up-to-date replacement for the AUR's
# 'ttf-ms-fonts', 'ttf-vista-fonts' and 'ttf-win7-fonts' packages.
# It provides newer versions of the fonts in these packages, but due
@gutenye
gutenye / gist:3728926
Created September 15, 2012 17:19
font-manager PKGBUILD
# Maintainer: Joeny Ang <ang(dot)joeny(at)gmail(dot)com>
# Contributor: Guan 'kuno' Qing <neokuno(at)gmail(dot)com>
pkgname=font-manager
pkgver=0.5.7
pkgrel=1
pkgdesc="A font management application for the GNOME desktop"
url="http://code.google.com/p/font-manager/"
arch=('i686' 'x86_64')
license=('GPL')
@gutenye
gutenye / yiwu.md
Created September 1, 2012 05:14
yiwu city

Yiwu is a city located in Zhejiang province, China. It has 1.2 million people, and the city is famous for its markets. It has Yiwu International Trade Mart, Huangyuan Market, Binwang Market and so on. The International Trade Mart, also known as Futian market is the main one and the biggest. It current has more than 100,000 suppliers with 400,000 kinds of products. Beside the market, It has meihu stadium, meihu expo center, Yiwu Highschool.

You can still have fun after the market closed at 5pm. The night in yiwu is very beautiful. There are a lot of foreign friends in Binwang Night Market at night, The public square has performances and shows. If you are hungry, Bingwang shangmaoqu is the place to go, and you can also go for a stree BBQ.