Skip to content

Instantly share code, notes, and snippets.

Mike Acton macton

Block or report user

Report or block macton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Setup Raspberry Pi 3.txt
Enabling SSH
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-6-using-ssh/enabling-ssh
Connecting to WPA2-Enterprise Wifi Network
https://raspberrypi.stackexchange.com/a/24670
How to Mount an External Hard Drive on the Raspberry Pi
https://www.modmypi.com/blog/how-to-mount-an-external-hard-drive-on-the-raspberry-pi-raspian
(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
---------------
http://www.cheat-sheets.org/saved-copy/git-cheat-sheet.pdf
http://alvinalexander.com/git/git-cheat-sheet-git-reference-commands
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.
See:
- http://www.bencode.net/blog/2012/10/20/clangonwindows/
- http://sourceforge.net/p/mingw/bugs/2043/
Steps:
1. Assumes mingw and gcc installed.
a. http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
b. Add c:\mingw\bin to PATH
@macton
macton / cpuid_features.c
Last active Aug 20, 2019
Print cpuid features
View cpuid_features.c
// See: Intel Intrinsics Guide https://software.intel.com/sites/landingpage/IntrinsicsGuide/
// See: CPUID Explorer http://www.flounder.com/cpuid_explorer1.htm
// See: Playing with cpuid http://newbiz.github.io/cpp/2010/12/20/Playing-with-cpuid.html
// See: MSDN __cpuid, __cpuidex http://msdn.microsoft.com/en-us/library/hskdteyh.aspx
// See: Notes on MMX/SSE and a searchable table of intrinsics. http://www.taffysoft.com/pages/20120418-01.html
// See: AMD CPUID Specification http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/25481.pdf
#if defined(__GNUC__)
#include <stdint.h>
#include <cpuid.h>
@macton
macton / smbmount
Last active Oct 28, 2016
smb mount linux
View smbmount
References:
[0] http://www.tldp.org/HOWTO/SMB-HOWTO-8.html
[1] http://www.cyberciti.biz/tips/how-to-mount-remote-windows-partition-windows-share-under-linux.html
[2] http://stackoverflow.com/questions/6734400/what-does-cifs-mount-failed-w-return-code-22-indicate
debian
$ sudo apt-get install smbclient
$ sudo apt-get install cifs-utils
$ sudo mkdir /mnt/something
$ sudo mount -t cifs //host/something -o username=user@domain.com,password=psswd /mnt/something
View README.md

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
macton / 00_webapp_tips.txt
Last active Jul 18, 2019
random webapp tips
View 00_webapp_tips.txt
Cross-domain file load in jsfiddle
http://jsfiddle.net/jgpSy/
------------------------------------------------
Using jquery.treeview + angular.js
- Dynamically loading json description of tree
- Building DOM with angular
- Calling $.treeview after DOM contructed.
500 items: http://jsfiddle.net/eaq2V/
5000 items: http://jsfiddle.net/Qkh9y/
View .bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
@macton
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
http://stackoverflow.com/a/13754307
$ smem
-------------------------------------------------------------------------------------------------------------
You can’t perform that action at this time.