Skip to content

Instantly share code, notes, and snippets.

View kn9ts's full-sized avatar
🌠
I am one with the force!

Eugene Mutai kn9ts

🌠
I am one with the force!
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

[
{
"currency": "DZD",
"country": "Algeria",
"name": "Algerian dinar"
},
{
"currency": "AOA",
"country": "Angola",
"name": "Kwanza"
const request = new XMLHttpRequest();
request.open('POST', 'https://vitumob.xyz/order', true);
request.setRequestHeader('Accept', 'application/json, */*');
request.setRequestHeader('Content-Type', 'application/json;charset=utf-8');
request.onload = () => {
if (request.readyState === request.DONE && request.status === 200) {
component.order = JSON.parse(request.responseText);
console.log('order: http://vitumob.xyz/cart/' + component.order.order_hex);
}
};
[
{
"name": "",
"official_name_en": "Channel Islands",
"official_name_fr": "Îles Anglo-Normandes",
"ISO3166-1-Alpha-2": "",
"ISO3166-1-Alpha-3": "",
"M49": "830",
"ITU": "",
"MARC": "",

In software development projects, a "mistake" or "fault" may be introduced at any stage. Bugs arise from oversights or misunderstandings made by a software team during specification, design, coding, data entry or documentation.

Conceptual errors are a developer's misunderstanding of what the software must do. The resulting may perform according to the developer's understanding, but not what is really needed.

Other types:

Arithmetic

// Hey guys, *would you like to spice up your web whatsapp or slack font*?
// => Open the the browser console `CMD + ALT + I`, select the *Console* tab and paste the above snippet.
// Have fun.
(function() {
var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('href', '//fonts.googleapis.com/css?family=Nova+Oval');
document.head.appendChild(link);
@kn9ts
kn9ts / env.sh
Created February 10, 2017 10:07 — forked from nicinabox/env.sh
Pack Chrome extensions from the command line
# $ crx `pwd`
function crx() {
~/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --pack-extension=$@ --pack-extension-key=$@/key.pem
}
@kn9ts
kn9ts / introrx.md
Created December 27, 2016 13:44 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
// USAGE
// var newDate = new Date();
// var datetime = "LastSync: " + newDate.today() + " @ " + newDate.timeNow();
// For todays date;
Date.prototype.today = function() {
return ((this.getDate() < 10) ? "0" : "") + this.getDate() + "/" + (((this.getMonth() + 1) < 10) ? "0" : "") + (this.getMonth() + 1) + "/" + this.getFullYear();
}
// For the time now
Date.prototype.timeNow = function() {
/**
* LOCAL STORAGE MANAGEMENT FUNCTION
* @param options - local(bool), content(object), backup(bool)
* @param key
* STORE CONTENT locally or in cookie or BOTH
*
* HOW TO USE:
localStorage('key') // Returns the content if existing, or false if it doesnt
localStorage('key', {
content: the content, can be a raw object, string or raw array // it is stringified by the function