Skip to content

Instantly share code, notes, and snippets.

View Setup Raspberry Pi 3.txt
Enabling SSH
Connecting to WPA2-Enterprise Wifi Network
How to Mount an External Hard Drive on the Raspberry Pi
(chroot) Install common stuff
View style.css
// Simple, readable style.css template
body {
font-family: "Georgia", "Verdana", "Lucida Grande", sans-serif;
margin: 20px auto;
width: 95%;
font-size: 70%;
line-height: 1.4;
View git_cheatsheet.txt
Git cheatsheets
Git concepts
Repository - Collection of commit history of files being managed (not directories)
Working directory - Files in local file system (may or may not be tracked)
View mingw-clang-build
Installation steps for getting a functional Clang++ build running on Windows 8 and MinGW.
1. Assumes mingw and gcc installed.
b. Add c:\mingw\bin to PATH
macton / cpuid_features.c
Last active Nov 10, 2020
Print cpuid features
View cpuid_features.c
// See: Intel Intrinsics Guide
// See: CPUID Explorer
// See: Playing with cpuid
// See: MSDN __cpuid, __cpuidex
// See: Notes on MMX/SSE and a searchable table of intrinsics.
// See: AMD CPUID Specification
#if defined(__GNUC__)
#include <stdint.h>
#include <cpuid.h>
macton / smbmount
Last active Oct 28, 2016
smb mount linux
View smbmount
$ sudo apt-get install smbclient
$ sudo apt-get install cifs-utils
$ sudo mkdir /mnt/something
$ sudo mount -t cifs //host/something -o,password=psswd /mnt/something

Run like so:

node gist-clone-all.js username

You'll want to replace "username" with your own username.

This script clones using the push URL, so you should probably be the owner of the gists. You could also use this to clone someone else's gists, but in that case you may wish to edit the code to use gist_pull_url instead.

macton / 00_webapp_tips.txt
Last active Jul 18, 2019
random webapp tips
View 00_webapp_tips.txt
Cross-domain file load in jsfiddle
Using jquery.treeview + angular.js
- Dynamically loading json description of tree
- Building DOM with angular
- Calling $.treeview after DOM contructed.
500 items:
5000 items:
View .bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
macton / linux_tips.txt
Last active Dec 13, 2015
Random Linux tips
View linux_tips.txt
View process memory info
$ cat /proc/<process_id>/smaps
Overall memory info
$ smem