Skip to content

Instantly share code, notes, and snippets.

@szymonkaliski
szymonkaliski / GitHub-Forking.md
Created September 21, 2020 09:39 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@szymonkaliski
szymonkaliski / readme.md
Created May 27, 2020 14:27
memex copy-paster templating language research

Output:

ejs

HTML:

<a href="http://some-url.com">
  test title
</a>
@szymonkaliski
szymonkaliski / index.js
Last active January 11, 2019 23:48
(un)constrained optimisation
const { uncmin } = require("numeric");
const fmin = require("fmin");
const data = require("./intervals-data.json");
document.body.style.display = "flex";
const makeDiv = title => {
const div = document.createElement("div");
const text = document.createElement("div");
@-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
#sVim-command {
@szymonkaliski
szymonkaliski / sVimrc
Last active May 5, 2018 08:30
sVimrc
set nosmoothscroll
let hintcharacters = "asdfewjklio"
let scrollduration = 0
unamp e
unmap "shift+d"
unmap "shift+e"
unmap "shift+g"
unamp 0
unmap $
@szymonkaliski
szymonkaliski / map.js
Last active July 17, 2017 06:40
example of using Leaflet with Neutron (https://github.com/szymonkaliski/Neutron)
const L = require('leaflet');
const csv = require('comma-separated-values');
const fs = require('fs');
const fileData = fs.readFileSync('quakes.csv').toString();
const csvData = csv.parse(fileData);
const linkEl = document.createElement('link');
linkEl.rel = 'stylesheet';
linkEl.href = 'file:///' + __dirname + '/node_modules/leaflet/dist/leaflet.css';
@szymonkaliski
szymonkaliski / jc_voronoi.h
Created April 15, 2017 10:43 — forked from kylemcdonald/jc_voronoi.h
C++ app for Voronoi relaxation of CSV points using https://github.com/JCash/voronoi
/*
ABOUT:
A fast single file 2D voronoi diagram generator.
HISTORY:
0.2 2016-12-30 - Fixed issue of edges not being closed properly
- Fixed issue when having many events

Keybase proof

I hereby claim:

  • I am szymonkaliski on github.
  • I am szymonkaliski (https://keybase.io/szymonkaliski) on keybase.
  • I have a public key ASD2G2YJgkYAlDxtlFjz9ObDKeTCi4pT9lO0fnhU9iPB-wo

To claim this, I am signing this object:

@szymonkaliski
szymonkaliski / BZWBK_online_portfolio_currency_converter.js
Created February 29, 2016 17:30
UserScript for converting everything in BZWBK panel into PLN, keeping it here so I won't loose it.
// ==UserScript==
// @name BZWBK Currency Converter
// @version 0.1
// @description computes currency in BZWBK online panel to display everything in PLN
// @author You
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser-polyfill.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js
// @require https://cdnjs.cloudflare.com/ajax/libs/money.js/0.2.0/money.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/accounting.js/0.4.1/accounting.min.js
(def google-get-cache (atom (cache/ttl-cache-factory {} :ttl (* 1000 60 60 1))))
(defn google-get [access-token path]
(-> (client/get (str "https://www.googleapis.com/calendar/v3/" path)
{:query-params {:access_token access-token}
:accept :json})
:body
(json/read-str :key-fn #(-> % ->kebab-case keyword))))
(defn google-get-cached [access-token path]