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 / 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'];
@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 / tinymce.js
Created January 31, 2015 12:53
wordpress tinymce directive for angular
/**
* Binds a TinyMCE widget to <textarea> elements.
*/
angular.module('ui.tinymce', [])
.value('uiTinymceConfig', {})
.directive('uiTinymce', ['uiTinymceConfig', function(uiTinymceConfig) {
uiTinymceConfig = uiTinymceConfig || {};
var generatedIds = 0;
@tarex
tarex / install.md
Last active August 29, 2015 14:13 — forked from zaherg/install.md

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
@tarex
tarex / gulpfile.js
Created October 14, 2014 23:34
My gulp file
var gulp = require('gulp'),
plug = require("gulp-load-plugins")({lazy:false})
wiredep = require('wiredep').stream;
gulp.task('bower', function () {
gulp.src('app/index.html')
.pipe(wiredep())
.pipe(gulp.dest('app/'));
});
@tarex
tarex / app.js
Created September 11, 2014 12:22
Press Enter to do something
app.directive('ngEnter', function () {
return function (scope, element, attrs) {
element.bind("keydown keypress", function (event) {
if(event.which === 13) {
scope.$apply(function (){
scope.$eval(attrs.ngEnter);
});
event.preventDefault();
}
@tarex
tarex / functions.php
Created August 31, 2014 15:02
wp breadcumbs
<?php
/**
*######################################################################
*# breadcrumbs
*######################################################################
*/

Bower-installer was written as a command-line app and doesn't yet expose an API. You could just use exec if you want to:

var exec = require('child_process').exec;

gulp.task('task', function (cb) {
  exec('bower-installer', function (err, stdout, stderr) {
    console.log(stdout);
    console.log(stderr);
    cb(err);

});

To hide iterm from the dock

/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist

And this to undo:

/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist
@tarex
tarex / bootstrap-problem.md
Created August 27, 2014 19:13
get rid from .map file 404 issue bootstrap

Just remove the line from bootstrap.css

/*# sourceMappingURL=bootstrap.css.map */