Skip to content

Instantly share code, notes, and snippets.

View WrathChaos's full-sized avatar
❤️‍🔥
Working Hard

FreakyCoder WrathChaos

❤️‍🔥
Working Hard
View GitHub Profile
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active June 4, 2024 04:16
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@derhuerst
derhuerst / intro.md
Last active February 22, 2024 17:30
Installing Git on Linux, Mac OS X and Windows
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
@mike-casas
mike-casas / install-nvm-zsh.txt
Last active June 13, 2024 00:46
install nvm on mac with zsh shell
After install zsh
- brew update
- brew install nvm
- mkdir ~/.nvm
after in your ~/.zshrc or in .bash_profile if your use bash shell:
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
@codediodeio
codediodeio / geo-json.ts
Last active November 9, 2021 12:54
A Typescript interface for GeoJSON objects based on rfc7946
export interface IGeometry {
type: string;
coordinates: number[];
}
export interface IGeoJson {
type: string;
geometry: IGeometry;
bbox?: number[];
properties?: any;
@dmamills
dmamills / example.js
Created August 22, 2017 13:25
Open/Close react-native animation example
import React, { Component } from "react";
import { AppRegistry, StyleSheet, Text, Dimensions, View, Animated, TouchableWithoutFeedback } from "react-native";
export default class animations extends Component {
state = {
played: false,
text: 'Welcome!',
animation: new Animated.Value(50),
a2: new Animated.Value(50),
at: new Animated.Value(0),
@WrathChaos
WrathChaos / git-alias.md
Last active May 13, 2021 15:39
MacOS .zshrc Aliases

Git Aliases

alias status="artii 'Status' | nyan && git status | nyan"
alias add="git add . | artii "Staged" | nyan"
alias glocal="git checkout local | artii 'Local Branch' | nyan"
alias dev="git checkout dev | artii 'Dev Branch' | nyan"
alias master="git checkout master | artii 'Master Branch' | nyan"
alias log="artii 'Logs' | nyan  && git log | nyan"
alias branch="artii 'Branches' | nyan && git branch | nyan"
@dvf
dvf / change-codec.md
Last active June 18, 2024 21:28
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX