Skip to content

Instantly share code, notes, and snippets.

View ggaaooppeenngg's full-sized avatar
🎧
Focusing

Peng Gao ggaaooppeenngg

🎧
Focusing
View GitHub Profile
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active May 20, 2024 13:01 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@larsar
larsar / shared_folder_centos_virtualbox.txt
Created January 27, 2012 08:04
Mount shared folder on CentOS in VirtualBox
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@border
border / mgoExample.go
Created August 27, 2012 15:33
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
package main
// Restorer holds a function that can be used
// to restore some previous state.
type Restorer func()
// Restore restores some previous state.
func (r Restorer) Restore() {
r()
}
@rlopc
rlopc / sigmoidFunction.matlab
Last active April 9, 2021 03:36
Compute sigmoid function, the hypothesis function in Logistic Regression
function g = sigmoidFunction(z)
% Compute sigmoid function
% You need to return the following variables correctly
g = zeros(size(z));
% Instructions: z can be a matrix, vector or scalar
g = 1.0 ./ ( 1.0 + exp(-z)); % For Matlab
% g = 1.0 ./ ( 1.0 + e.^(-z)); % For Octave, it can use 'exp(1)' or 'e'
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 4, 2024 23:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

# If you're looking into the C10M problem (10 million concurrent connections)
# you might want to play with DPDK (Originally proprietry Intel, now open source)
#
# C10M: http://c10m.robertgraham.com/
# DPDK: http://dpdk.org/
#
# This is a quick summary how to install dpdk on ubuntu
# running inside virtualbox on a mac
# On my Mac:
@soarez
soarez / ca.md
Last active June 19, 2024 19:32
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@noromanba
noromanba / thinkpad-trackpoint-speed.mkd
Last active August 26, 2023 13:01
change pointer speed of Trackpoint on Thinkpad T60

Thinkpad Trackpoint speed configuration on Linux

change pointer speed of Trackpoint on Thinkpad

works well T60 with Ubuntu 13.10 and Ubuntu 14.04 LTS

how to change

speed configration by write integer to file

0 <- slower ------------ faster -> 250

@mitchwongho
mitchwongho / Docker
Last active June 26, 2024 07:28
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash