Skip to content

Instantly share code, notes, and snippets.

View ismnoiet's full-sized avatar

ismnoiet

  • Planet Earth
View GitHub Profile
@ismnoiet
ismnoiet / write-append-file.js
Created March 14, 2016 08:58 — forked from umidjons/write-append-file.js
NodeJS: Write/Append into a file
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){
@ismnoiet
ismnoiet / 00.howto_install_phantomjs.md
Created August 11, 2016 22:50 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

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 / backbone-sync-override.js
Created February 12, 2017 13:17 — forked from elijahmanor/backbone-sync-override.js
Overriding Backbone.sync to POST instead of PUT/DELETE/PATCH
// 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 ) {