Skip to content

Instantly share code, notes, and snippets.

View mllavez's full-sized avatar
:octocat:
Cat Pops

Marcos Alexander Chávez mllavez

:octocat:
Cat Pops
View GitHub Profile
@mllavez
mllavez / OpenWithSublimeText2.bat
Created April 14, 2017 15:54 — forked from mrchief/LICENSE.md
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
@mllavez
mllavez / shuffle_assoc
Created April 6, 2017 18:20 — forked from Quinten/shuffle_assoc
shuffle an array while preserving keys
<?php
function shuffle_assoc($list) {
if (!is_array($list)) return $list;
$keys = array_keys($list);
shuffle($keys);
$random = array();
foreach ($keys as $key)
$random[$key] = $list[$key];
return $random;
@mllavez
mllavez / print_r2.php
Created April 5, 2017 21:58 — forked from Shelob9/print_r2.php
Make print_r() more readable. Found on http://us2.php.net/print_r
<?php
function print_r2($val){
echo '<pre>';
print_r($val);
echo '</pre>';
}
?>
@mllavez
mllavez / print_r2.php
Created April 5, 2017 21:58 — forked from Shelob9/print_r2.php
Make print_r() more readable. Found on http://us2.php.net/print_r
<?php
function print_r2($val){
echo '<pre>';
print_r($val);
echo '</pre>';
}
?>
@mllavez
mllavez / .gitignore
Created March 30, 2017 16:22 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #