Skip to content

Instantly share code, notes, and snippets.

Petar Telbiyski telbiyski

Block or report user

Report or block telbiyski

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
View Chain
function Chain(fn) {
let _callback = null,
_then = fn;
this.then = fn => {
_callback = fn;
_then.call(this, this.resolve);
return this;
};
View jquery templates
function(selector) {
var self = this,
_element;
if (!selector) {
self.fragment = document.createDocumentFragment();
} else {
var reference = VirtualSelectors[selector];
if (reference) {
_element = VirtualDOM[reference];
} else {
@telbiyski
telbiyski / bounce animation
Created Nov 12, 2017
add/remove class on keypress
View bounce animation
var flag = 0;
window.addEventListener('keydown', add, false);
window.addEventListener('keyup', remove, false);
function add() {
if (flag === 0) {
console.log('add class')
}
flag++;
View install phantomjs 2.1.1 - ubuntu
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
You can’t perform that action at this time.