Skip to content

Instantly share code, notes, and snippets.

const { createServer } = require('http');
createServer((req, res) => {
res.writeHead(200, {
Connection: 'Transfer-Encoding',
'Content-Type': 'text/html; charset=utf-8',
'Transfer-Encoding': 'chunked'
});
res.write(`
@onosendi
onosendi / das-hotkey-generator.py
Last active October 28, 2022 09:11
DAS Trader hotkey generator
"""
das-hotkey-generator
~~~~~~~~~~~~~~~~~~~~
If you came across this and have no idea what it is, read the article I
wrote here: https://forums.bearbulltraders.com/topic/518-position-sizing
on position sizing, and how I manage my risk.
INTRO
=====
@jherax
jherax / configure.md
Last active May 2, 2024 21:54
VS Code: Debugging with Jest

VS Code: Debugging Jest

Sometimes, debugging with console.log is not enough to find out what is happening in the code, as console.log prints only plain objects but neither functions nor objects with circular references. Besides, it's possible you may need to know the context and flow of the code.

Read more about debugging with VS Code in VS Code: Debugging.

@swyxio
swyxio / 1.md
Last active February 8, 2024 22:30
Learn In Public - 7 opinions for your tech career

2019 update: this essay has been updated on my personal site, together with a followup on how to get started

2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos

@stramel
stramel / HOWTO.md
Last active February 28, 2024 17:45
Installing Powerline fonts on Windows 10

Installing Powerline fonts on Windows 10

Steps

  1. Download and extract zip from here
  2. Press Windows + x
  3. Press a (Selects PowerShell (Admin))
  4. Navigate to directory where fonts were extracted to (cd ${HOME}\Downloads\fonts-master\fonts-master)
  5. Set Execution Policy Set-ExecutionPolicy RemoteSigned [1]
  6. Press y then Enter to accept
@zorrodg
zorrodg / LICENSE
Last active November 30, 2023 19:37
CLI Integration Test Helper
MIT License
Copyright © 2019 Andrés Zorro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@h-parekh
h-parekh / Installing_jenkins_with_openshift.md
Last active July 12, 2021 19:21
Setup Jenkins (LTS) using Minishift and Docker Hub

Assumptions

  • You are using MacOS 10 or above
  • Have Homebrew installed
  • You need a dev-only setup

Commands

Step 1: Install Minishift and a VirtualBox hypervisor

brew cask install minishift

brew cask install virtualbox

@michaelcurry
michaelcurry / rfc-template.md
Created September 29, 2016 18:07
RFC Template [Markdown]

RFC Template

Feature Name: (fill me in with a unique identity, myawesomefeature)

Type: (feature, enhancement)

Start Date: (fill me in with today's date, YYYY-MM-DD)

Author: (your names)

@maumercado
maumercado / queryBuilder.js
Last active January 16, 2019 03:11
batchinate or pagination by batches
require('rootpath')();
var mongoose = require('mongoose');
var async = require('async');
var _ = require('lodash');
var Query = mongoose.Query;
Query.prototype._batchinate = function(options, callback) {
var query = this;
var model = query.model;
@kucukharf
kucukharf / Finance.excel.rate.js
Last active February 23, 2024 08:42
Excel RATE() Javascript Function
/*!
* @fileOverview Finance Excel Rate Formula Javascript Equivalent
* @version 1.0.0
*
* @author Burak Arslan @kucukharf http://www.github.com/kucukharf
* @license
* Copyright (c) 2010-2018 Burak Arslan
* Licensed under Creative Commons (CC) license
* @usage RATE($periods, $payment, $present, $future, $type, $guess)
*/