Skip to content

Instantly share code, notes, and snippets.

@taiansu
taiansu / fix_exfat_drive.md
Created September 24, 2019 21:34 — forked from scottopell/fix_exfat_drive.md
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
@taiansu
taiansu / _Phoenix_webpack_bootstrap4_fontawesome5.5.md
Last active October 27, 2019 15:40 — forked from nicbet/_Webpack-Fontawesome-Bootstrap-Phoenix.md
Sass versions of Bootstrap 4 and Fontawesome 5 with Elixir / Phoenix Framework 1.3 and 1.4 using Webpack

Sass versions of

  • Bootstrap 4
  • Fontawesome 5.5

with Elixir / Phoenix Framework 1.3 and 1.4 using Webpack 4 and Babel 7

@taiansu
taiansu / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
defmodule Chat.Client do
def join(server) do
client_send server, :join
end
def say(server, message) do
client_send server, { :say, message }
end
def leave(server) do
@taiansu
taiansu / mapreduce.js
Created December 28, 2011 11:45 — forked from adomado/mapreduce.js
Simple MapReduce with Javascript
var Job = {
data : [
"We are glad to see you here. This site is dedicated to",
"poetry and to the people who make poetry possible",
"poets and their readers. FamousPoetsAndPoems.com is",
"a free poetry site. On our site you can find a large",
"collection of poems and quotes from over 631 poets",
"Read and Enjoy Poetry",
"I, too, sing America",
@taiansu
taiansu / detect_cleartype.js
Created December 27, 2011 17:15 — forked from cbeier/detect_cleartype.js
detect ClearType using javascript
/*
* TypeHelpers version 1.0
* Zoltan Hawryluk, Nov 24 2009.
* @see http://www.useragentman.com/blog/2009/11/29/how-to-detect-font-smoothing-using-javascript/
*
* Released under the MIT License. http://www.opensource.org/licenses/mit-license.php
*
* Works for
* - IE6+ (Windows),
* - Firefox 3.5+ (Windows, Mac, Linux),
@taiansu
taiansu / memusage.rb
Created October 7, 2011 14:05 — forked from sxalexander/memusage.rb
WebFaction Memory Usage Script
#!/usr/bin/env ruby
# Memory usage script for WebFaction customers adapted to attempt to
# draw username from the pwd
# Nick Trew <vxnick@gmail.com>
# 2009-05-25
# START CONFIG #
require 'pathname'
@taiansu
taiansu / .bash_profile
Created August 8, 2011 07:01 — forked from ihower/gist:897951
bash_profile setting
export CLICOLOR=1;
export LSCOLORS=ExFxCxDxBxegedabagacad;
function git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
echo "("${ref#refs/heads/}") ";
}
function git_since_last_commit {
now=`date +%s`;