Skip to content

Instantly share code, notes, and snippets.

View aziz's full-sized avatar

Allen Bargi aziz

  • Gothenburg, Sweden
View GitHub Profile
class ContactForm
@to = "Jason Seifer <jason@twistedmind.com>"
include ActiveModel::AttributeMethods
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Translation
extend ActiveModel::Callbacks
attr_accessor :name, :email, :message
@aziz
aziz / waitUntilExists.js
Created September 27, 2012 08:03
waitUntilExists.js
/*
* Wait Until Exists Version v0.2 - http://javascriptisawesome.blogspot.com/
*
*
* TERMS OF USE - Wait Until Exists
*
* Open source under the BSD License.
*
* Copyright © 2011 Ivan Castellanos
* All rights reserved.
# This is a markdown doument
The color scheme is bluish.
```css
html {
background-color: #00161B;
font-family: "consolas";
color: #F8F8F8;
padding: 0;
Type | Total | Disabled | Enabled
————————————————+———————+——————————+————————
Built-in | 49 | 28 | 21
Package Control | 148 | 45 | 103
Total | 199 | 75 | 124
Package Control Packages (Enabled):
————————————————————————————————————————————
Abacus
AceJump
@aziz
aziz / gist:94e8de8990b3f592f9aa4cec9f95ad4e
Created May 11, 2016 22:55
sublime errors in console
Packages/Makefile/syntax_test_makefile.mak:3:1: [comment] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:6:1: [keyword.control.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:6:9: [support.function.builtin.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:6:52: [keyword.operator.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:6:61: [support.variable.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:11:2: [keyword.control.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:13:1: [keyword.control.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:16:1: [keyword.control.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:19:1: [keyword.control.makefile] does not match scope [text.plain]
Packages/Makefile/syntax_test_makefile.mak:
# edit.py
# buffer editing for both ST2 and ST3 that "just works"
import sublime
import sublime_plugin
from collections import defaultdict
try:
sublime.edit_storage
except AttributeError:
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
@aziz
aziz / .tmux.conf
Created January 29, 2012 01:53 — forked from paulrouget/.tmux.conf
Paul's configurations files
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# THEME
set -g status-bg black
@aziz
aziz / snippet.js
Created September 28, 2011 21:03 — forked from necolas/snippet.js
Optimise DOM insertion of cross-domain scripts
( function ( win, doc ) {
// Google Analytics global variable
win._gaq = [ ['_setAccount','UA-XXXXX-X'], ['_trackPageview'], ['_trackPageLoadTime'] ];
// Array of cross-domain script urls
var urls = [
'//connect.facebook.net/en_US/all.js', // Facebook SDK
'//platform.twitter.com/widgets.js', // Twitter Widgets
'https://apis.google.com/js/plusone.js', // Google +1 Button
@aziz
aziz / jquery.image_wrapper.js
Created September 23, 2011 12:47
jQuery Image Wrapper
$(document).ready(function(){
$("img").load(function() {
$(this).wrap(function(){
return '<span class="image-wrap ' + $(this).attr('class') + '" style="position:relative; display:inline-block; background:url(' + $(this).attr('src') + ') no-repeat center center; width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;" />';
});
$(this).css("opacity","0");
});
});