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 <TFT_HX8357.h> | |
TFT_HX8357 gl = TFT_HX8357(); | |
int mode = 0; | |
#define WATCH_COUNT 5 | |
byte watch[WATCH_COUNT << 1]; | |
void setup() { |
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
░░░░░░░░░░░░░▄███▄▄▄░░░░░░░ | |
░░░░░░░░░▄▄▄██▀▀▀▀███▄░░░░░ | |
░░░░░░░▄▀▀░░░░░░░░░░░▀█░░░░ | |
░░░░▄▄▀░░░░░░░░░░░░░░░▀█░░░ | |
░░░█░░░░░▀▄░░▄▀░░░░░░░░█░░░ | |
░░░▐██▄░░▀▄▀▀▄▀░░▄██▀░▐▌░░░ | |
░░░█▀█░▀░░░▀▀░░░▀░█▀░░▐▌░░░ | |
░░░█░░▀▐░░░░░░░░▌▀░░░░░█░░░ | |
░░░█░░░░░░░░░░░░░░░░░░░█░░░ | |
░░░░█░░▀▄░░░░▄▀░░░░░░░░█░░░ |
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 biggestfile='du -cks * | sort -rn | head' | |
alias freedisk='df -h' | |
alias foldersize='du -hs' |
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
// Millet evalle tc kimlik doğrulama yazmış. Manyak la bunlar | |
// 10. satırda 7 * t - c negatif çıkması durumunda hesabın bozulmaması için +30 yapılmıştır. (Bazı insanların negatif çıkabiliyor) | |
function tcKimlikKontrol(s) { | |
if (!(/^[1-9]\d{9}[02468]$/.test(s))) return false; | |
var t = +s[0] + +s[2] + +s[4] + +s[6] + +s[8], | |
c = +s[1] + +s[3] + +s[5] + +s[7]; | |
if (s[9] != ((30 + t * 7 - c) % 10)) return false; |
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
function asyncForeach(array, fn, atEnd) { | |
var at = -1; | |
function next(shouldBreak) { | |
if (shouldBreak || ++at == array.length) { | |
if (atEnd) { | |
setTimeout(atEnd); | |
} | |
} else { | |
setTimeout(fn, 0, array[at], next); | |
} |
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
var getRobberies = function (done) { | |
console.log('%c Soygun seçiliyor.', 'background: black; color: white') | |
$.ajax({ | |
type: "GET", | |
url: 'https://www.thecrims.com/api/v1/robberies', | |
success: function (res) { | |
done(res.single_robberies | |
.filter(robbery => robbery.successprobability == 100) | |
.sort((a, b) => b.difficulty - a.difficulty) | |
.find((x, index) => index == 0)) |
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
function deferred() { | |
let r; | |
let p = new Promise(a => r = a); | |
p.r = r; | |
return p; | |
} | |
function lock() { | |
let queue = []; | |
let locked = false; | |
return { |
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
export class Lock { | |
private chain: Promise<any> = Promise.resolve(null); | |
busy = false; | |
acquire(deadlockSafeTimeout = 0, acquireTimeout = 0) { | |
let acquireTimeoutId: any = null; | |
let acquireFailed = false; | |
let unlock: () => void; | |
let unlockingPromise = new Promise(r => unlock = r); |
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 PAGE_KEYS_CREATE: React.FC = () => { | |
return <Form | |
submit={(data) => console.log(data)} | |
submitText="Create" | |
fields={{ | |
name: { | |
label: 'Name', | |
type: 'text', | |
validation: GenericTextValidation |
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
import { js } from './js-literal'; | |
// easy call | |
let result = js()`1`; | |
// auto context | |
let result2 = js()`${result}`; | |
assert(result === result2); | |
// auto context, objects |