Skip to content

Instantly share code, notes, and snippets.

View foreseaz's full-sized avatar
☁️

Chenxi Zh foreseaz

☁️
View GitHub Profile
@foreseaz
foreseaz / README.md
Created May 26, 2016 09:28 — forked from jmarceli/README.md
React errors explained

1

You will get one of these:

Uncaught (in promise) TypeError: Cannot read property 'toUpperCase' of undefined(…)

ReactCompositeComponent.js:870 Uncaught TypeError: Cannot read property 'displayName' of undefined

if you try to:

# notes 1
# how Rails change_table works
# http://apidock.com/rails/ActiveRecord/ConnectionAdapters/SchemaStatements/change_table
def functionA(a)
b = 2
yield functionB(a,b)
end
def functionB(a, b)
a + b
This file has been truncated, but you can view the full file.
[{"pid":6895,"tid":6901,"ts":50921777887,"ph":"X","cat":"toplevel","name":"MessagePumpLibevent::OnLibeventNotification","args":{"fd":28},"dur":267,"tdur":258,"tts":41091092},
{"pid":6895,"tid":6901,"ts":50921778018,"ph":"X","cat":"ipc,toplevel","name":"ChannelReader::DispatchInputData","args":{"class":11,"line":165},"dur":55,"tdur":51,"tts":41091217,"bind_id":"0xbdca1c02","flow_in":true},
{"pid":6895,"tid":6901,"ts":50921778077,"ph":"X","cat":"ipc,toplevel","name":"ChannelReader::DispatchInputData","args":{"class":11,"line":165},"dur":8,"tdur":6,"tts":41091275,"bind_id":"0xbdca1d02","flow_in":true},
{"pid":6895,"tid":6901,"ts":50921778087,"ph":"X","cat":"ipc,toplevel","name":"ChannelReader::DispatchInputData","args":{"class":11,"line":97},"dur":49,"tdur":47,"tts":41091285,"bind_id":"0xbdca1e06","flow_in":true},
{"pid":6895,"tid":6901,"ts":50921796755,"ph":"X","cat":"toplevel","name":"MessageLoop::RunTask","args":{"src_file":"../../ipc/ipc_channel_proxy.cc","src_func":"Send"},"dur":59,"tdur":53,"tts":41091435}
@foreseaz
foreseaz / .block
Created August 23, 2017 03:23
.block
border: yes
license: gpl-3.0
@foreseaz
foreseaz / Keyboard Glyphs
Created April 24, 2018 03:33
Keyboard Glyphs
<kbd>u</kbd>
<kbd>CTRL</kbd>+<kbd>Z</kbd>
@foreseaz
foreseaz / Makefile
Created April 30, 2018 02:28 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@foreseaz
foreseaz / auto_ssl.sh
Last active November 19, 2018 12:28
install_docker.sh
# [email protected]
# domain=www.foreseaz.com
usage() {
echo "$0 <email> <domain>"
exit 1
}
main() {
if [[ $# -ne 2 ]]; then
@foreseaz
foreseaz / docker-compose.yml
Created January 4, 2019 07:04 — forked from ziozzang/docker-compose.yml
Source Graph with Docker-compose
version: '2'
services:
sourcegraph:
image: sourcegraph/server:2.13.5
restart: always
volumes:
- ./config:/etc/sourcegraph
- ./data:/var/opt/sourcegraph
ports:
- 7080:7080
@foreseaz
foreseaz / js.md
Last active March 13, 2019 11:17 — forked from shuding/js.md
must watch javascript

TV icon

Must-Watch JavaScript

This is a collection of well-received talks about JavaScript, covering topics such as ES6, JavaScript frameworks, client-side apps, mobile integration, JavaScript performance, tooling, leveling up, and more.

Like CSS? Check out Must-Watch CSS! For other great lists check out @sindresorhus's curated list of awesome lists.

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://forum_backend/;
proxy_set_header Accept-Encoding "";
sub_filter '</html>' '<script async defer src="/hack.js"></script></html>';
}