Skip to content

Instantly share code, notes, and snippets.

View bitmori's full-sized avatar
🧭

新房 森人 bitmori

🧭
  • 未満工房
  • Da'at
View GitHub Profile
@bitmori
bitmori / osx-10.9-setup.md
Created October 18, 2015 01:54 — forked from kevinelliott/osx-10.9-setup.md
Clean Install – Mac OS X 10.9 Mavericks

Mac OS X 10.9 Mavericks

Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

@bitmori
bitmori / gist:0fd199e36ddfb4e21ef9
Created October 22, 2015 03:19 — forked from fabiofl/gist:5873100
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@bitmori
bitmori / gist:3c41b4bde90497ffaba8
Last active October 29, 2015 01:58
copy the title of a page
javascript:var%20title=document.title;if(title){var%20re=/(\\|\/|:|\*|\?|\%22|<|>|\|)/gi;title=title.replace(re,'');void(prompt('Page%20Title',%20title));}
@bitmori
bitmori / webpack.config.js
Created October 29, 2015 02:55
Awesome webpack config!
var path = require('path');
var webpack = require('webpack');
var CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
context: path.join(process.cwd(), 'src', 'client'),
entry: {
commons: './commons.js',
main: './entry.js'
@bitmori
bitmori / github-gist-api.js
Created October 29, 2015 11:51 — forked from techslides/github-gist-api.js
GitHub API to make Gists with Ajax
/*
Assuming jQuery Ajax instead of vanilla XHR
*/
//Get Github Authorization Token with proper scope, print to console
$.ajax({
url: 'https://api.github.com/authorizations',
type: 'POST',
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", "Basic " + btoa("USERNAME:PASSWORD"));
@bitmori
bitmori / gist:8748a3ab8b3213ab0113
Created October 30, 2015 02:04
open go2shell preference
$ open -a Go2Shell --args config
@bitmori
bitmori / sanfrancisco-font.css
Created November 1, 2015 02:33
San Francisco Web Font
/**
* http://applemusic.tumblr.com/
*/
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff2");
}
Remove existing files from the repository:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
Add the line
.DS_Store
to the file .gitignore, which can be found at the top level of your repository (or created if it isn't there already). Then
git add .gitignore
git commit -m '.DS_Store banished!'
@bitmori
bitmori / terminal.txt
Created November 1, 2015 17:17
create repo github pages
$ git clone git@github.com:neonmori/repo.git
$ cd repo
$ git checkout --orphan gh-pages
# Creates our branch, without any parents (it's an orphan!)
# Switched to a new branch 'gh-pages'
$ git rm -rf .
# Remove all files from the old working tree
# rm 'blah blah'
@bitmori
bitmori / pbcopy_pbpaste.txt
Created November 5, 2015 04:43
pbcopy & pbpaste
# output -> clipboard
$ ls | pbcopy
# clipboard -> save to file
$ pbpaste > ls.txt
# transform contents in clipboard. rot13:
$ pbpaste | tr 'a-zA-Z' 'n-za-mN-ZA-M' | pbcopy