This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19063699041183922230424640119986913758023341770758751642047601347737139606611941581352175797681575117149435847472379921576378 | |
82010873314125910417098681679467651061196703036344503828425038021866296075656578591024747456403918197240660392231867709196530 | |
05547299081771122978128893134012025555840439838755861696435926779779011155301553716406948852775421829267789075611169229413304 | |
42028620073205237675530442721666962286683534927131293735270935475331266785352417198234822645786435208887529004886675157771888 | |
87716254578233139050956841337551473116293899780647416270305365091493516756140179109318676578254373967658333126619554398248807 | |
73901335039931398874577719039802288956276828455645089612214856059038950787855805249688802161731552101060793394882144824301838 | |
80013352318345613661078428780673839967965501913764666716551387847921893809223464453567368379243079836222406059944397498046708 | |
72409291568897359376555992566277167049359808026761803186968491038946326201866824309514704973489863815255632689038911077381036 | |
1679702913915218 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const lineLength = 126; | |
const sizeInKb = process.argv[2] || 100; | |
let data = ""; | |
for(var i = 0; i < sizeInKb * 1024; i++) { | |
if (i && i % lineLength === 0) { | |
data += "\n"; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Higher order functions, being curried. Considered pure functional, because they don't have any side effects | |
// (mutate any given data). They just derive data from data. | |
let plus = { (first: Int) in { (second: Int) in first + second } } | |
let multiplesOf = { (first: Int) in { (second: Int) in second % first != 0 } } | |
// Just a simple first class function, not per se functional. Usable to reduce a collection of integers into the total. | |
let total: (Int, Int) -> Int = { $0 + $1 } | |
let calculation = (1...30) | |
.map(plus(2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================== Generic (limited) curry function: | |
func curry<A, B, C>(_ f: @escaping (A, B) -> C) -> (A) -> (B) -> C { | |
return { a in { b in f(a, b) }} | |
} | |
// ========================== Example 1: | |
let add = curry((+) as ((Int, Int) -> Int)) | |
let add2 = add(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <string.h> | |
#include <conio.h> | |
#include <joystick.h> | |
#include <nes.h> | |
static const char text[] = "get on that nesdev"; | |
int main(void) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*****************************************************************************\ | |
** mandelbrot sample program for cc65. ** | |
** ** | |
** (w) 2002 by groepaz/hitmen, TGI support by Stefan Haubenthal ** | |
\*****************************************************************************/ | |
#include <stdlib.h> | |
#include <time.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <cc65.h> | |
#include <conio.h> | |
#include <tgi.h> | |
#include <nes.h> | |
#include <joystick.h> | |
#define TGI_COLOR_BLACK 0x00 | |
#define TGI_COLOR_GREEN 0x01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gp='function __gp() { (python3 ~/Documents/python/$1.py $(shift;printf "$*") 2>/dev/null) || echo "File not found or errors occurred."; unset -f __gp; }; __gp' | |
# (assumption hiworld.py is an actual file) | |
# | |
# usage: gp hiworld | |
# usage: gp sub/dir/hiworld arg0 arg1 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// random bootstrapper for any theoretical ts/js application | |
const timeout = (millis: number, fn: () => void) => new Promise(c => setTimeout(c, millis)).then(fn); | |
(async function boot() { | |
// this try-catch is an additional safety net used for (poorly) written applications in which errors | |
// are not properly caught | |
try { | |
// some random loading of initial components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Bitbucket totals in PR | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Show total changed lines of code | |
// @author You | |
// @match https://bitbucket.org/*/*/pull-requests/* | |
// @grant none | |
// ==/UserScript== |