Skip to content

Instantly share code, notes, and snippets.

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@unknownuser88
unknownuser88 / Revert sublime text 3 to a fresh state.md
Created May 24, 2017 10:59 — forked from math2001/Revert sublime text 3 to a fresh state.md
Revert Sublime Text 3 to a fresh state step by step 🙂

How do I revert Sublime Text 3 to a fresh state

This little gist will walk you through the process of reverting your Sublime Text installation to a fresh state.

This simply means to get Sublime Text to exactly as it was by default.

Hum... Will I lose all my setup?

No. You can go back to how you were really easily, and it's explained at the bottom. 😉

@unknownuser88
unknownuser88 / node_wget_downloader.js
Created April 10, 2017 13:25
node wget downloader
var fs = require('fs');
var url = require('url');
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;
// Function to download file using wget
var download_file_wget = function(file_url, download_dir, file_name_to_save, onProgress, cb) {
// extract the file name
var file_name = url.parse(file_url).pathname.split('/').pop();
@unknownuser88
unknownuser88 / coin_animation.js
Created February 15, 2017 13:20
coin animation
function animateCoins(from, to, cb) {
var fromTop, fromLeft, toTop, toLeft;
var cxTime = 400,
cxRadius = 30,
goMaxTime = 1400,
goMinTime = 700,
coins = [];
if (typeof from == "object") {
@unknownuser88
unknownuser88 / file_loader.js
Last active February 2, 2017 11:37
load js and css files
var Load = function() {}
Load.prototype = {
log: function(t) {
console.log("Loader: " + t);
},
makeUrl: function(filename, noCache) {
if (!noCache) return filename;
if (filename.indexOf("?") === -1)
filename += "?no_cache=" + new Date().getTime();
@unknownuser88
unknownuser88 / lostfilm.py
Created January 26, 2017 18:55 — forked from kstep/lostfilm.py
lostfilm download script
#!/usr/bin/env python2
# -*- encoding: utf-8 -*-
import re
import os
import sys
import json
import argparse
import yaml
from logging import getLogger
@unknownuser88
unknownuser88 / mysql.partition
Created March 22, 2016 13:23
mysql partisioning
ALTER TABLE book_keeping
PARTITION BY RANGE( YEAR(action_time) )
SUBPARTITION BY HASH( MONTH(action_time) )
SUBPARTITIONS 12 (
PARTITION p2015 VALUES LESS THAN (2016),
PARTITION p2016 VALUES LESS THAN (2017),
PARTITION p2017 VALUES LESS THAN (2018),
PARTITION p2018 VALUES LESS THAN (2019),
PARTITION p2019 VALUES LESS THAN (2020),
PARTITION p2020 VALUES LESS THAN (2021),
@unknownuser88
unknownuser88 / wgetter.js
Created March 14, 2016 18:24
node download file wget
var fs = require('fs');
var url = require('url');
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;
// Function to download file using wget
var download_file_wget = function(file_url, download_dir, file_name_to_save, onProgress, cb) {
// extract the file name
var file_name = url.parse(file_url).pathname.split('/').pop();
@unknownuser88
unknownuser88 / array_contains.js
Created July 17, 2015 14:17
array contains functionality for node js
Array.prototype.contains = function(k, callback) {
var self = this;
return (function check(i) {
if (i >= self.length) {
return callback(false);
}
if (self[i] === k) {
return callback(true);
}
return process.nextTick(check.bind(null, i+1));
// encode(decode) html text into html entity
var decodeHtmlEntity = function(str) {
return str.replace(/&#(\d+);/g, function(match, dec) {
return String.fromCharCode(dec);
});
};
var encodeHtmlEntity = function(str) {
var buf = [];
for (var i=str.length-1;i>=0;i--) {