Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mahnunchik's full-sized avatar
🤪
I may be slow to respond.

Evgeny mahnunchik

🤪
I may be slow to respond.
View GitHub Profile
@d0n13
d0n13 / Install.md
Last active February 16, 2022 11:00
Install Cardano node on M1 Mac using Debian VM
@ngustavo
ngustavo / models-index.js
Last active March 15, 2024 14:36
Sequelize ES6 model loader for sqlite
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import Sequelize from 'sequelize';
const models = {};
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
const basename = path.basename(filename);

Why I hate TypeScript

Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.

Not Standard

TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.

Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.

Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!

@MichaelPote
MichaelPote / himawari.ps1
Created February 3, 2016 19:11
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
#
# Himawari-8 Downloader
#
#
#
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
#
# http://himawari8.nict.go.jp/himawari8-image.htm
#
@andyshinn
andyshinn / Dockerfile
Created December 24, 2015 19:07
BusyBox cron container example
FROM gliderlabs/alpine:3.3
COPY myawesomescript /bin/myawesomescript
COPY root /var/spool/cron/crontabs/root
RUN chmod +x /bin/myawesomescript
CMD crond -l 2 -f
@martinheidegger
martinheidegger / internationalization-nodejs.md
Last active September 2, 2019 08:41
Internationalization in Node.js

Internationalization in Node.js

A primer on i18n in Node.js by Martin Heidegger on the night between Dec. 24 and Dec. 25 2015

Many ways lead to the metaphorical rome to achieve i18n and by extension l10n in Node.js. Several packages such as i18next, i18n or node-gettext provide quite accepted implementations for internationalization, yahoo also has pushed the game and published formatjs. But even with those packages at hand i18n can be tricky! Target platform, workflow, human resources, user experience, revisioning - all of that plays an important role when choosing how to setup internationalization for a system. To give a deeper insight in the matter I collected my understanding of i18n in thi

@walterreade
walterreade / xgb_aws.txt
Created September 8, 2015 15:31
XGBoost on AWS
sudo apt-get install make
sudo apt-get update
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install git
sudo git clone https://github.com/dmlc/xgboost
cd xgboost
./build.sh
cd python-package
python setup.py install
@telekosmos
telekosmos / uniq.js
Last active November 15, 2022 17:13
Remove duplicates from js array (ES5/ES6)
var uniqueArray = function(arrArg) {
return arrArg.filter(function(elem, pos,arr) {
return arr.indexOf(elem) == pos;
});
};
var uniqEs6 = (arrArg) => {
return arrArg.filter((elem, pos, arr) => {
return arr.indexOf(elem) == pos;
});
@nolanlawson
nolanlawson / protips.js
Last active February 4, 2024 18:06
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@chernjie
chernjie / logrotate.d-docker
Created April 17, 2015 17:31
Logrotate docker logs, copy this file to /etc/logrotate.d/docker
/var/lib/docker/containers/*/*-json.log {
dateext
daily
rotate 365
compress
delaycompress
missingok
}