Skip to content

Instantly share code, notes, and snippets.

💭
Coding, of course...

Noel Martin Llevares dashmug

💭
Coding, of course...
Block or report user

Report or block dashmug

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rename_script_generator.vbs
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim fso, startFolder, folder, files, lines
Set fso = CreateObject("Scripting.FileSystemObject")
startFolder = fso.GetAbsolutePathName(".")
Set folder = fso.GetFolder(startFolder)
Set files = folder.Files
@dashmug
dashmug / .nanorc
Created Jun 1, 2014
Nano configuration
View .nanorc
set autoindent
set const
set fill 80
unset nonewlines
set smooth
set tabsize 4
set tabstospaces
set smarthome
include ~/.nano/apacheconf.nanorc
@dashmug
dashmug / osx_tools.md
Last active Aug 29, 2015
Essential tools I need when working on OS X
View osx_tools.md

Essential Apps

  • SublimeText
  • Skype
  • Chrome
  • Firefox
  • Alfred
  • iTerm
  • Clipmenu
  • SizeUp
@dashmug
dashmug / dashmug.zsh-theme
Created Jun 2, 2014
My custom oh-my-zsh theme. Place inside custom.
View dashmug.zsh-theme
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%} git:"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_HG_PROMPT_PREFIX="%{$fg[green]%} hg:"
ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_HG_PROMPT_DIRTY=" %{$fg[red]%}⚡"
ZSH_THEME_HG_PROMPT_CLEAN=""
@dashmug
dashmug / update_toolset.sh
Last active Aug 29, 2015
a simple script I use for updating my Homebrew, composer, pip, npm, and gem packages
View update_toolset.sh
set -e
set -x
sudo aptitude update
sudo aptitude upgrade -y
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
sudo npm -g install "$package"
View django_dev_server.sh
apt-get install python-software-properties
add-apt-repository ppa:keithw/mosh
apt-get update && apt-get upgrade -y
apt-get install -y \
python-dev \
python3-dev \
build-essential \
git \
@dashmug
dashmug / combinations.php
Created Jun 17, 2013
A package that returns all the combinations and permutations, without repitition, of a given set and subset size. Associative arrays are preserved. Download from: http://pear.php.net/package/Math_Combinatorics/download
View combinations.php
require_once 'Math/Combinatorics.php';
$combinatorics = new Math_Combinatorics;
var_dump($combinatorics->combinations(array(
'one' => 'a',
'two' => 'b',
'three' => 'c',
'four' => 'd',
), 3));
@dashmug
dashmug / search_and_replace.pl
Created Jun 24, 2013
Search and replace text in a directory
View search_and_replace.pl
perl -pi -w -e 's/SEARCH_FOR/REPLACE_WITH/g;' *.txt
@dashmug
dashmug / remove_duplicates.sql
Created Jun 24, 2013
To remove duplicates in a MySQL table.
View remove_duplicates.sql
ALTER IGNORE TABLE table ORDER BY address ASC ADD UNIQUE KEY 'address' (`address`);
@dashmug
dashmug / .bash_profile
Created Aug 27, 2013
My Mac OS X `.bash_profile`.
View .bash_profile
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
export PATH=/usr/local/sbin:$PATH
#export PS1="\W \$ "
PS1="\[\e[1;96m\]\u@\h:\[\e[1;93m\] \w \[\e[1;96m\]\@\n\$\[\e[0m\] "
export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
You can’t perform that action at this time.