View prototypical_inheritance_example.js
// Car Object constructor
function Car (brand, color) {
if (typeof brand === 'undefined' || typeof color === 'undefined') {
throw new Error('Please dont leave neither brand nor color empty');
}
this.brand = brand;
this.color = color;
}
View terminalcolors.py
#!/usr/bin/env python
# Copyright (C) 2006 by Johannes Zellner, <johannes@zellner.org>
# modified by mac@calmar.ws to fit my output needs
# modified by crncosta@carloscosta.org to fit my output needs
import sys
import os
def echo(msg):
os.system('echo -n "' + str(msg) + '"')
View create_files_with_random_names.py
import string
import random
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
for i in range(0, 140):
filename = id_generator()
open('file_' + id_generator() + '.txt', 'w')
View remove_numbers_from_filenames.py
import os
for filename in os.listdir("."):
newfilename = ''.join([i for i in filename if not i.isdigit()])
os.rename(filename, newfilename)
View get_highcharts_chart_types.js
$('#plotOptions-menu .menuitem>a:first-child').each(function(index, item) {
var $item = $(this).html();
console.log('const ' + $item.toUpperCase() + ' = \'' + $item + '\';');
});
View az_translit.sql
replace(
replace(
replace(
replace(
replace(
replace(
replace(
replace(
replace(
replace(
View sumResultOfAnyNumberOfFunctions.js
function sumResultOfAnyNumberOfFunctions() {
var sum = 0;
for (var i = 0; i < arguments.length; i++) {
sum += parseInt(arguments[i]());
}
return sum;
}
View event_emitter.js
function EventEmitter() {
this.evets = [];
}
EventEmitter.prototype.on = function(event, callback) {
this.events[event] = callback();
var args = arguments;
callback(args);
}
View keybase.md

Keybase proof

I hereby claim:

  • I am nalekberov on github.
  • I am nukachu (https://keybase.io/nukachu) on keybase.
  • I have a public key ASBlLhtvUAm2a1eRpFKKCiEHSPj2VvqBRiaf2ASuXUEWIgo

To claim this, I am signing this object:

View postgres_replace_html_encoded_azeri_characters.sql
REPLACE (
REPLACE (
REPLACE (
REPLACE (
REPLACE (
REPLACE (
REPLACE (
REPLACE (
REPLACE (
REPLACE (