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
-- this applescript will start/activate iTerm (close the default window if the app had been newly started), then open a new session with a desired profile | |
on is_running(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end is_running | |
set iTermRunning to is_running("iTerm2") | |
tell application "iTerm" | |
activate |
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
# neildaemond theme is a slightly tuned version of "philips": | |
# - I wanted hostname & and full path based on '~' | |
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
PROMPT='%{$fg[$NCOLOR]%}%B%n%{$fg[green]%}@%M%b%{$reset_color%}:%{$fg[blue]%}%B%~/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' | |
RPROMPT='[%*]' | |
# git theming | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " |
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
// place at ~/.config/Code/User/keybindings.json | |
[ | |
{ | |
"key": "ctrl+w", | |
"command": "workbench.files.action.focusFilesExplorer", | |
"when": "!editorIsOpen && !multipleEditorGroups" | |
}, | |
{ | |
"key": "ctrl+w", | |
"command": "-workbench.action.closeWindow", |
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
# remove current vim | |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
# removes current link for vim | |
sudo rm -rf /usr/local/share/vim /usr/bin/vim | |
# add ppa for newest version of ruby (currently, as of 06/06/2017, ruby v2.4) | |
#sudo apt-add-repository ppa:brightbox/ruby-ng | |
sudo apt-get update |
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
Generally, I use The Pathogen plugin to manage my plugins, and I strongly reccomend you switch to using it too. | |
The update_bundles script was written by Tammer Saleh, and published by him in his blog post which talks about why we should switch to Pathogen plugin for vim: | |
http://tammersaleh.com/posts/the-modern-vim-config-with-pathogen | |
His update_bundles script will remove plugins from the bundle folder, then grab the most updated version from their respective git repositories. You can modify that script to include/exclude your vim plugins which reside in ./bundle | |
//no longer using scala... so ignore the following block | |
//I have added scala support for exuberant-ctags by adding a .ctag file containing regex expressions found on |
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 | |
## this script is based on: | |
## https://elinux.org/RPi_Text_to_Speech_(Speech_Synthesis) | |
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&q=$1&tl=en"; } | |
recorded=( | |
"My first comment is that soemthing comes first", | |
"Then the Second thing comes", |
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 Hex {- from rtfeldman/elm-hex/1.0.0 -} | |
import Bitwise | |
import Char | |
hashOpp : Char -> Int -> Int | |
hashOpp char hash = | |
(Char.toCode char) + ((Bitwise.shiftLeftBy 5 hash) - hash) | |
stringToHexColor : String -> String |
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
function hashCode(str) { // java String#hashCode | |
var hash = 0; | |
for (var i = 0; i < str.length; i++) { | |
hash = str.charCodeAt(i) + ((hash << 5) - hash); | |
} | |
return hash; | |
} | |
function intToRGB(i){ | |
var c = (i & 0x00FFFFFF) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<center><h1>Elm Boilerplate!</h1></center> | |
<br/><br/> | |
<div id="elm_target"></div> | |
<script> |
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 | |
## this script is based on: | |
## https://elinux.org/RPi_Text_to_Speech_(Speech_Synthesis) | |
say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?ie=UTF-8&client=tw-ob&q=$1&tl=en"; } | |
recorded=("Step One. go to the box in the corner", | |
"Step Two. input a template name") |
NewerOlder