This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your settings in this file to overwrite the default settings | |
{ | |
"update.mode": "manual", | |
"telemetry.telemetryLevel": "off", | |
"telemetry.enableCrashReporter": false, | |
"telemetry.enableTelemetry": false, | |
"editor.fontSize": 15, | |
"editor.fontFamily": "Source Code Pro Medium", | |
"editor.fontWeight": "normal", | |
"editor.unicodeHighlight.ambiguousCharacters": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find $1 -name .git -type d -exec sh -c 'echo $(realpath {}/..); cd {}/..; git status > /dev/null' \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val isHardwareAccelerated = | |
window.attributes.flags and WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED != 0 | |
if (isHardwareAccelerated) { | |
webView.setLayerType(View.LAYER_TYPE_HARDWARE, null) | |
} else { | |
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.dark (SL).tmTheme", | |
"enable_tab_scrolling": false, | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Source Code Pro", | |
"font_size": 11, | |
"hot_exit": false, | |
"ignored_packages": | |
[ | |
"GitStatus", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mergeArraysKeepOrder(a1, a2) { | |
var a = []; | |
var i = 0, j = 0; | |
while (true) { | |
for (; i < a1.length; i++) { | |
if (a2.indexOf(a1[i], j) != -1) { | |
i++; | |
break; | |
} | |
a.push(a1[i]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this in /etc/profile.d/history_up_down_keys.sh | |
bind '"\e[A": history-search-backward' | |
bind '"\e[B": history-search-forward' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function capitalizeWords(text) { | |
let result = ''; | |
let wordCharIndex = 0; | |
for (let i = 0; i < text.length; i++) { | |
let c = text.charAt(i); | |
if (/\s/.test(c)) { | |
wordCharIndex = 0; | |
} else { | |
if (wordCharIndex == 0) { | |
c = c.toUpperCase(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int argc, char **argv) | |
{ | |
FILE *file; | |
FILE *out_file; | |
unsigned char c; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Add this to your postinstall script in package.json: | |
# "scripts": { | |
# "postinstall": "path/to/patch-xcode-projects.sh" | |
# } | |
if [[ "$(uname -a)" = *"Darwin"* ]]; then | |
echo "Patching Xcode projects" | |
for project in $(find node_modules -name '*.pbxproj'); do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rm -rf $TMPDIR/metro-* | |
rm -rf $TMPDIR/haste-* | |
watchman watch-del-all |