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 Data.List | |
import System.IO | |
-- Int: -2^63 to 2^63 | |
minInt = minBound :: Int | |
maxInt = maxBound :: Int | |
-- Integer: no range | |
-- Double: up to 11 points of precision |
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 seen = {} | |
$('table tr').each(function() { | |
var txt = $(this).text() | |
if (seen[txt]) | |
$(this).remove() | |
else | |
seen[txt] = true | |
}) |
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
<template> | |
<div class="custom-select-wrapper"> | |
<div class="custom-select"> | |
<div class="custom-select__trigger"><span>{{ options[0].name }}</span> | |
<div class="arrow"></div> | |
</div> | |
<div class="custom-options"> | |
<span v-for="option in options" v-bind:key="option.id" :class="{ 'custom-option selected': option.id == 0, 'custom-option': option.id !== 0 }">{{ option.name }}</span> | |
</div> | |
</div> |
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
/** | |
** -- Assumes a storted list (ascending) as input | |
**/ | |
function binarySearch(inputArray, token) { | |
if (token > inputArray[inputArray.length - 1]) { | |
console.log('Not found'); | |
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <immintrin.h> | |
#define ARRAY_SIZE 8 | |
// Returns processor timestamp | |
// Used to benchmark direct CPU cycles | |
uint64_t rdtsc() { | |
unsigned int lo, hi; |
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
from os import symlink | |
header = '''======================================= | |
| Windows Symlink Tool by Jake Rieger | | |
======================================= | |
''' | |
print(header) | |
def repl() -> None: | |
isDirStr = input("Directory (y/n)? ") |
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
# EXAMPLE | |
''' | |
rootDir = "F:" | |
keepItems = ['some_file.txt', 'some_directory'] | |
Will delete everything in 'F:' that isn't in 'keepItems' | |
''' | |
import pathlib | |
from pathlib import WindowsPath |
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
''' | |
Counts the total number of lines in all text files of | |
a specified directory, filtered by extension | |
Ex. | |
$ python3 source_line_count.py ~/Code/DataStructures ".c,.h" | |
''' | |
import sys | |
import os |
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
{ | |
"background": "#24283B", | |
"black": "#414868", | |
"blue": "#7AA2F7", | |
"brightBlack": "#565F89", | |
"brightBlue": "#448CFF", | |
"brightCyan": "#4AD4FF", | |
"brightGreen": "#87FFEC", | |
"brightPurple": "#9F6DFF", | |
"brightRed": "#F76373", |
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
AccessModifierOffset: -4 | |
AlignAfterOpenBracket: Align | |
BinPackArguments: false | |
BinPackParameters: false | |
AlignConsecutiveAssignments: true | |
AlignOperands: Align | |
AllowAllArgumentsOnNextLine: false | |
AllowAllConstructorInitializersOnNextLine: false | |
AllowAllParametersOfDeclarationOnNextLine: true | |
AllowShortBlocksOnASingleLine: Never |
OlderNewer