Skip to content

Instantly share code, notes, and snippets.

View gion's full-sized avatar
💭
🦄 🌈 🍦

Bogdan Gradinariu gion

💭
🦄 🌈 🍦
View GitHub Profile
@gion
gion / post-merge.sh
Created April 2, 2014 10:11
This is a pull (actually a merge) git hook that automatically installs bower and node dependencies if the bower.json or packge.json files have been changed in the targeted commit has
#!/bin/sh
#Inspired by http://www.snip2code.com/Snippet/15944/git-hook-for-bower-install-and-npm-insta
#Notice: This won't run at git fetch. since fetch doesn't merge anything
#Installation:
# copy this script with the name:`post-merge.sh` to your project root folder
# symlink it to the ./git/hooks/post-merge: `ln post-merge.sh .git/hooks/post-merge
#You should have bash (windows users, means cygwin/mingw anything that works for you
#Based on the instructions here: https://oknesset-devel.readthedocs.org/en/latest/workflow.html#before-coding
// js interview test application
;(function(global, app, undefined) {
function assert(testResult, okMsg, failMsg) {
if(testResult) {
console.log('[assert passed]', okMsg);
} else {
console.error('[assert failed]', failMsg || okMsg);
}
@gion
gion / less-recess-grunt.js
Created October 9, 2014 08:13
how to config grunt to use less instead of css/sass (using grunt-recess)
/*!
include the following in the package.json file:
"grunt-recess": "~0.6.1",
"grunt-contrib-less": "~0.11.0"
and then run `npm install/update`
*/
//...
@gion
gion / facebook.invite-all.js
Created January 20, 2015 09:51
a simple script to run in console in order to send an invite(for a page) to all your friends
[].slice.call(document.querySelectorAll('span'), 0).filter(function(el){return el.innerText === 'Invite';}).forEach(function(el){el.click();})
@gion
gion / test.js
Last active August 29, 2015 14:17
alert(4);
@gion
gion / codeship_android_build.sh
Last active September 22, 2015 10:42 — forked from PuKoren/codeship_android_build.sh
Codeship Android build script
#Download Android SDK from Google and unzip it
curl --location http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -x -z -C $HOME
export ANDROID_HOME=$HOME/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
#Thanks to https://github.com/makinacorpus/android-archetypes/wiki/Getting-started:-Configure-your-environment for the command lines
#While loop is for auto-accept licence terms (press y every 1 sec)
#Install build tools
( sleep 1 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-21.1.2
#Now we want at least two SDK to test our build
#Download Android SDK from Google and unzip it
curl --location http://dl.google.com/android/android-sdk_r24.1.2-linux.tgz | tar -x -z -C $HOME
export ANDROID_HOME=$HOME/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
#Thanks to https://github.com/makinacorpus/android-archetypes/wiki/Getting-started:-Configure-your-environment for the command lines
#While loop is for auto-accept licence terms (press y every 1 sec)
#Install build tools
( sleep 1 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-21.1.2
#Now we want at least two SDK to test our build
@gion
gion / Flexbox showcase.markdown
Created October 1, 2015 08:09
Flexbox showcase
@gion
gion / index.html
Created April 18, 2013 20:44
A CodePen by gion.
<div class="parent">
<div class="child"></div>
</div>
@gion
gion / jquery.plugin.template.js
Last active December 16, 2015 12:28
a jquery plugin template
;(function(window, $, undefined){
// name your plugin
var pluginName = 'enter-your-plugin-name-here';
// optionally keep track of your plugin's version
var version = '0.0.1';
// all the logic resides here
function pluginLogic(el, options){