This file contains 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
# Fish function to import bash aliases v0.2 | |
# Copyright (C) 2016 Malte Biermann | |
# Copyright (C) 2017 Rodrigo Bermudez Schettino | |
# Released under the GPL | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains 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
// Sublime Text - Build System for Javascript | |
// | |
// Created using the instructions shown in | |
// https://gist.github.com/corbanb/d0d6bdcfbd8eb455ce99 | |
{ | |
"cmd": ["/usr/local/bin/node", "$file"], | |
"selector": "source.js", | |
} |
This file contains 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
<html> | |
<head> | |
<script src="http://fb.me/react-0.13.3.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/parse/1.10.0/parse.js"></script> | |
</head> | |
<style type="text/css"> | |
* { | |
font-family: "Lucida Console", Monaco, monospace; | |
} |
This file contains 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
fetch('http://localhost') | |
.then((response) => { | |
console.log('response ', response) | |
if (response.status === 200) { | |
console.log('success') | |
} else { | |
console.warn('error') | |
} | |
}) | |
.catch((error) => { |
This file contains 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/bash | |
# Copyright (C) 2017 Rodrigo Bermudez Schettino | |
# Script to replace a line in a text file | |
# Create file with sample text | |
echo "this will be replaced" > file.txt | |
############ | |
# file.txt # | |
############ |
This file contains 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
#!/usr/local/bin/fish | |
# Use current date as name of file where fish | |
# abbreviations will be stored | |
# Format: YYYY-MM-DD | |
set -lx EXPORT_FILENAME (date "+%Y-%m-%d") | |
# Prepare destination fish script | |
echo "#!/usr/local/bin/fish" > $EXPORT_FILENAME.fish | |
# Write all abbreviations to file |
This file contains 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
import sublime | |
import sublime_plugin | |
import os | |
import subprocess | |
from subprocess import check_output as shell | |
from datetime import datetime | |
try: | |
si = subprocess.STARTUPINFO() | |
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW |
This file contains 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
import I18n from 'i18n' | |
const deepKeys = require('deep-keys'); | |
const NO_DIFF = null | |
Object.defineProperty(Object.prototype, 'translations', { | |
get: function() { | |
let locale = Object.keys(this)[0] | |
return [ locale, this[locale] ] |
This file contains 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/bash | |
FILE_TO_WATCH=<PATH TO SVG> | |
filewatcher $FILE_TO_WATCH 'reload' "osascript -e 'tell application \"Safari\" to set URL of current tab of front window to \"file://$FILE_TO_WATCH\"'" |
This file contains 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/bash | |
# Create an empty file with size 10 MB | |
mkfile -n 10m foo | |
# Create an empty file with size 1 GB | |
mkfile -n 1g foo |
OlderNewer