Skip to content

Instantly share code, notes, and snippets.

Avatar

ismnoiet

  • Planet Earth
View GitHub Profile
@ismnoiet
ismnoiet / backbone-sync-override.js
Created Feb 12, 2017 — forked from elijahmanor/backbone-sync-override.js
Overriding Backbone.sync to POST instead of PUT/DELETE/PATCH
View backbone-sync-override.js
// The following could have been replaced by setting `Backbone.emulateHTTP = true;`
Backbone._sync = Backbone.sync;
Backbone.sync = function( method, model, options ) {
var beforeSend = options.beforeSend;
options = options || {};
if ( method === "update" || method === "delete" || method === "patch" ) {
options.beforeSend = function( xhr ) {
@ismnoiet
ismnoiet / 00.howto_install_phantomjs.md
Created Aug 11, 2016 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@ismnoiet
ismnoiet / write-append-file.js
Created Mar 14, 2016 — forked from umidjons/write-append-file.js
NodeJS: Write/Append into a file
View write-append-file.js
var f='write.txt',
fs=require('fs');
fs.writeFile(f,'Some text to write.',function(err){
if(err)
console.error(err);
console.log('Written!');
});
fs.appendFile(f,'Some more text to append.',function(err){
View essential-javascript-links.md