Skip to content

Instantly share code, notes, and snippets.

@pastleo
pastleo / GA-H170N-WIFI_NV970_DebianJessie.md
Last active March 9, 2018 22:16
Install drivers (firmware) for debian 8 (jessie) on GA-H170N-WIFI with Nvidia GTX970

Install drivers (firmware) for debian 8 (jessie) on GA-H170N-WIFI with Nvidia GTX970

After installing debian 8 (jessie) on my GA-H170N-WIFI with Nvidia GTX970, there are many hardwares not working properly. After digging for some time, I finally get everything working. So I am going to write this simple note to help people might need this in the future (for me as well).

Today is 2016/6/25, many things may be fixed in the future

Things not working properly after installation:

  • Audio chip Realtec ALC1150 built on GA-H170-WIFI
@pastleo
pastleo / make_gif.sh
Created June 23, 2016 18:50
a small helper to use imagemagick and apply option on filename
#!/bin/bash
set -e
if [ $# -lt 3 ]; then
echo "Usage: $0 <src_folder> <output> [default_opts]"
echo "Example: $0 ./ ../result.gif -delay 5"
exit 255
fi
oriPwd=$(pwd)
@pastleo
pastleo / besg.conf
Created June 4, 2016 18:17
My AWS php-fpm settings
server {
listen 80;
server_name besg.pastleo.me;
root /usr/share/nginx/besg;
index index.html index.htm index.php;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
@pastleo
pastleo / index.js
Created May 28, 2016 06:31
freecodecamp crawler using promise, generator and coroutine
var request = require('request-promise');
var co = require('co');
var fs = require('fs');
var cheerio = require('cheerio');
var dateFormat = require('dateformat');
var usernames = ['jd615645', 'jayhung97724'];
var fcc_info = [];
@pastleo
pastleo / .minttyrc
Created December 28, 2015 07:06
mintty settings
BoldAsFont=yes
Transparency=low
Term=xterm-256color
CursorType=block
Locale=C
Charset=UTF-8
BellFlash=yes
BellTaskbar=no
OpaqueWhenFocused=yes
Font=Consolas
@pastleo
pastleo / installation.sh
Created October 4, 2015 20:35
My OSX Environment Setup Scripts
# get brew, more info here: http://brew.sh
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# get packages
brew install \
android-sdk autoconf automake bash boost brew-cask cloog cloog018 composer cowsay docker docker-machine emacs faac fig findbugs fish freetype gcc gcc49 gdbm gettext git git-lfs glew glfw3 gmp gmp4 go gradle highlight htop-osx icu4c isl isl011 jpeg lame libav libevent libgpg-error libksba libmpc libmpc08 libpng libtool libyaml lua mpfr mpfr2 node nvm openssl p7zip pgcli php56 pkg-config postgresql python python3 readline reattach-to-user-namespace ruby sdl2 sl source-highlight sqlite thefuck tmux tree unixodbc unrar vim vsftpd wget x264 xvid xz zlib
http://caskroom.io
brew install caskroom/cask/brew-cask
@pastleo
pastleo / osx-for-hackers.sh
Created July 23, 2015 10:27
OSX system settings for Hackers
#!/bin/sh
# ===============================
# Hacker's OSX setting
# ===============================
# Modified by PastLeo from https://gist.github.com/brandonb927/3195465
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
@pastleo
pastleo / git_action_set_tutor.md
Last active August 27, 2016 15:11
My Git Action Sets & Tutorials

My Git Action Sets & Tutorial

Init the git repo

  • git clone <url> [path]
  • git init

Trouble-Free Actions

@pastleo
pastleo / PythonHW1_s101056017.py
Created May 19, 2015 12:14
PythonHW1_s101056017 ID generator
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from Tkinter import *
import random
Proj_name = "PythonHW1_s101056017 ID generator"
random.seed()
root = Tk(Proj_name)
@pastleo
pastleo / Hackpad_code.md
Last active August 29, 2015 14:18
How to create code with syntax hightlight

How to create code with syntax hightlight