View increment_decrement.py
import sublime | |
import sublime_plugin | |
class NumberCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
selection = self.view.sel() | |
for region in selection: | |
try: | |
value = int(self.view.substr(region)) | |
self.view.replace(edit, region, str(self.op(value))) |
View shaToBcrypt.php
<?php | |
/** | |
* Check if string is sha1 | |
* | |
* @return bool | |
* @author Nielsiano | |
**/ | |
public function is_sha1($password) | |
{ | |
return preg_match('/^[a-z0-9]{40}$/i', $password); |
View .zshrc
# Path to oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# name of the theme | |
# ~/.oh-my-zsh/themes/ | |
ZSH_THEME="nielsiano" | |
# aliases | |
alias zshconfig="subl ~/.zshrc" | |
alias -g subl=sublime |
View nielsiano.zsh-theme
PROMPT=' | |
%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[green]%}]" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" |
View numberFormat.php
<?php | |
/** | |
* Format Number | |
* | |
* Returns the supplied number with commas and a decimal point. | |
* Fixed for Danish Kroner format | |
* | |
* @access public | |
* @return float |