Skip to content

Instantly share code, notes, and snippets.

View tarex's full-sized avatar
🎯
Focusing

Tareq Jobayere tarex

🎯
Focusing
View GitHub Profile
@tarex
tarex / coktail.css
Last active August 29, 2015 14:16 — forked from rashedInt32/coktail.css
/* Bootstrap */
/* ====================================================== */
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
@tarex
tarex / recurly.php
Created March 9, 2015 12:47
problem
$subscription = new Recurly_Subscription();
$subscription->plan_code = $_POST['plan_id'];
$subscription->currency = 'USD';
$unique_id = uniqid();
$subscription->account = new Recurly_Account($unique_id);
$subscription->account->first_name = $_POST['user']['first_name'];
$subscription->account->last_name = $_POST['user']['last_name'];
$subscription->account->email = $_POST['user']['email'];

HTTP Status Code Definitions

Informational 1xx

This class of status code indicates a provisional response.

Code Text Description
100 Continue The client SHOULD continue with its request.
101 Switching Protocols The server understands and is willing to comply with the client's request.

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@tarex
tarex / passport.js
Last active August 29, 2015 14:22 — forked from manjeshpv/passport.js
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
// ES6 tl;dr; for beginners
// 1. variables
// `const` & `let` are scoped at the block level
if(true) {
let foo = "bar"
}
foo // ReferenceError
@tarex
tarex / main.js
Created August 1, 2012 22:30
RequireJS 2 config with jquery , underscore and backbone.js using schim
require.config({
paths:{
jquery:'libs/jquery/jquery',
underscore:'libs/underscore/underscore',
backbone:'libs/backbone/backbone'
},
shim:{
underscore:{
deps:[],
@tarex
tarex / tarex.zsh-theme
Created August 14, 2012 21:26
my zsh theme
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
function get_pwd() {
print -D $PWD
}
function battery_charge() {
@tarex
tarex / Custom.css
Created August 16, 2012 08:17 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*