Skip to content

Instantly share code, notes, and snippets.

View heronyang's full-sized avatar
😶
No Regrets

Heron Yang heronyang

😶
No Regrets
View GitHub Profile

為什麼我們這樣生活 那樣工作? - Charles Duhigg

第一部 個人習慣

1. 習慣迴路

  • 短期失憶症者仍可以執行習慣動作
  • 老鼠找路的動作習慣之後,大腦會減少運轉
  • 習慣迴路:提示 - 習慣動作(基底核) - 獎酬(大腦回饋)
  • 利用習慣迴路培養習慣,代替喪失記憶的大腦功能
#!/usr/bin/python
import random
SAMPLE_AMOUNT = 1000000
CHESS_TOTAL_AMOUNT = 36
CHESS_PICKED_AMOUNT = 15
CHESS_BOARD_SIZE = 6
#!/usr/bin/python
for i in range(50, 100):
v1 = i / 10
v2 = i % 10
# should both be even
if v1 % 2:
continue

Preface

Academic

  • Start (Assignments)
  • Regular Life (Daily Life during the semester)
  • Final (Projects, and co-works)

Friends

  • Best Friend (Web)
  • Project Friends
WSGIPythonPath /home/username/bugkiller/webapp
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName bugkiller.heron.me
ServerAlias bugkiller.heron.me
WSGIScriptAlias / /home/username/bugkiller/webapp/webapp/wsgi.py
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName xxx.com
ServerAlias xxx.com
#DirectoryIndex index.html
DocumentRoot /home/username/xxx.com/
# Custom log file locations
sudo apt-get install apache2 # web server
sudo aptitude install libapache2-mod-wsgi # wsgi
sudo a2enmod wsgi # enable wsgi
@heronyang
heronyang / .zshrc
Created March 31, 2015 06:07
.zshrc
# =========================================================================== #
# #
# .zshrc #
# Adapted from Tom Shen's zshrc #
# #
# Author: Jake Zimmerman #
# Email: [email protected] #
# #
# =========================================================================== #
/*
0804849c <_IO_stdin_used>:
80484a0: 31 c0 xor %eax,%eax
80484a2: 50 push %eax
80484a3: 68 2f 2f 73 68 push $0x68732f2f
80484a8: 68 2f 62 69 6e push $0x6e69622f
80484ad: 89 e3 mov %esp,%ebx
80484af: 50 push %eax
80484b0: 53 push %ebx
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char alpha_bin[4096];
char invalid[]="BINSHbinsh";
int i;