Skip to content

Instantly share code, notes, and snippets.


Adnan Asani adnasa

Block or report user

Report or block adnasa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
adnasa / gist:9066686
Created Feb 18, 2014
merge HEAD of file from another branch
View gist:9066686
$: git checkout A
$: git checkout --patch B f
adnasa / index.base.php
Created Mar 21, 2014
Base index for silex.
View index.base.php
require_once __DIR__.'/../vendor/autoload.php';
use Symfony\Component\HttpFoundation\Request;
$app = new Silex\Application();
$app->register(new Silex\Provider\TranslationServiceProvider(), array(
'translator.messages' => array(),
adnasa / gist:c5eaf4a31a8e8da91516
Created May 28, 2014
VIM: normal mode new line
View gist:c5eaf4a31a8e8da91516
nmap <S-Enter> o<Esc> " new NEXT line in normal mode
nmap <S-Backspace> O<Esc> " new PREVIOUS line in normal mode
View gitignore_global
# Custom stuff
# Added to my repo
# IDEs and code-editors
adnasa / live templates
Last active Aug 29, 2015
unit-testing snippets
View live templates
# pstorm
$this->assertCount($START$, $COUNTABLE$); $END$
$this->asserTrue($START$, $BOOLEAN$); $END$
$this->asserEquals($START$, $CHECK_EQUAL$); $END$
$this->assertInstanceOf('$START', $INSTANCE$); $END$
adnasa / login.js
Created Nov 6, 2014
Login into a system
View login.js
var casper = require('casper').create();
var utils = require('utils');
var URL_LOGIN = "";
var URL_AUTH = "";
var AUTH_TOKEN = null;
var AUTH_EMAIL = null;
var AUTH_PASS = null;
casper.start(URL_LOGIN, function() {
adnasa / discograph-qtip.js
Last active Aug 29, 2015
quick and dirty hack to get the discography list from an artist in wikipedia :D
View discograph-qtip.js
var _ = require('underscore')._;
var casper = require('casper').create({
clientScripts: [
verbose: true,
logLevel: 'debug'
adnasa / artistAlbumsToMarkdown.js
Created Nov 16, 2014
Quick play with nodejs fs module
View artistAlbumsToMarkdown.js
var fs = require('fs');
var _ = require('underscore')._;
var artists = [{
name: 'Raphaeel Saadiq',
album: [
'Instant Vintage'
}, {
View tiny-js-pubsub.js
/*! Js Pub/Sub
* Copyright (c) Anas Nakawa
* inspired by Ben Alman's one <>
* MIT License
(function( p ) {
var e = p.e = {};
# whats up
alias whats="vagrant"
You can’t perform that action at this time.