Skip to content

Instantly share code, notes, and snippets.

@madevelopers
madevelopers / qunit-template.html
Created March 25, 2012 06:39
HTML: qunit template
<html>
<head>
<title>Untitled Test</title>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-git.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/qunit/qunit-git.js"></script>
<script type="text/javascript" src="tests.js"></script>
</head>
@madevelopers
madevelopers / sublime: Preferences.sublime-settings
Last active December 27, 2015 12:59
This is my preferences settings for sublime text
{
"bold_folder_labels": true,
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"font_face": "Ubuntu Mono",
"font_options":
[
"subpixel_antialias"
],
@madevelopers
madevelopers / sublime: Default.sublime-keymap
Last active December 27, 2015 12:59
My sublime key bindings
[
{ "keys": ["ctrl+k", "ctrl+t"], "command": "title_case" },
{ "keys": ["alt+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"} }
]
@madevelopers
madevelopers / sublime: plugins
Last active December 27, 2015 13:09
list of my favorite sublime text plugins
DocBlockr
Emmet
GitGutter
Better Coffeescript
Indent XML
Sidebar Enhancements
Plain Tasks
Tomorrow Color Schemes
Theme Soda
Sublime Linter
@madevelopers
madevelopers / gist:7817848
Created December 6, 2013 02:51
HTML5: Download text file
<a href="data:text;charset=utf-8,Content" download="filename.txt">Download file</a>
<!-- Content must be encoded: encodeURIComponent("Sample Content") -->
@madevelopers
madevelopers / bash: git prompt
Last active January 2, 2016 04:29
My preferred bash prompt colors with gitprompt.
# This is my bash prompt is a copy on my eOS machine.
# load git prompt
# download it here: https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh
source ~/.git-prompt.sh
if [ "$color_prompt" = yes ]; then
PS1='\n${debian_chroot:+($debian_chroot)}\u@\h:\e[36m\w\e[95m$(__git_ps1)\e[39m\n\$ '
else
PS1='\n${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1)\n\$ '
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# base-files version 4.1-1
# ~/.bashrc: executed by bash(1) for interactive shells.
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# base-files version 4.1-1
# ~/.bash_profile: executed by bash(1) for login shells.
# This function defines a 'cd' replacement function capable of keeping,
# displaying and accessing history of visited directories, up to 10 entries.
# To use it, uncomment it, source this file and try 'cd --'.
# acd_func 1.0.5, 10-nov-2004
# Petar Marinov, http:/geocities.com/h2428, this is public domain
cd_func ()
{
local x2 the_new_dir adir index
local -i cnt
# Interactive operation...
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Default to human readable figures
alias df='df -h'
alias du='du -h'
# Misc :)