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 hid | |
def button_check(report): | |
button_press = report[8] | |
# print("{:08b}".format(button_press)) | |
if button_press == 0: | |
return | |
a = button_press & 0b00000001 | |
if a: |
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
{ | |
"version": 1, | |
"notes": "", | |
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", | |
"keyboard": "reviung/reviung41", | |
"keymap": "reviung_reviung41_layout_reviung41_mine", | |
"layout": "LAYOUT_reviung41", | |
"layers": [ | |
[ | |
"KC_LSFT", |
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
# Download file and have python version 3.8 or newer installed | |
# run "python main.py" | |
from pathlib import Path | |
import collections | |
import re | |
def top_n_words(input_file: str, common_words: str, n: int) -> None: | |
input_data = Path(input_file).read_text() |
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 <iostream> | |
using namespace std; | |
int main() { | |
std::cout << "Hello, World!" << std::endl; | |
string input; | |
string output=""; | |
cout<< endl; | |
int i=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
8.125,B4 (7,2) | |
8.25,E4 (7,2) | |
9.375,D5 (7,2) | |
9.625,E5 (7,2) | |
9.75,E4 (7,2) | |
9.875,D4 (7,2) | |
10,B1 (8,4) | |
10,A4 (7,2) | |
11.5,B4 (7,2) | |
11.75,A4 (7,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 'derivative.inc' | |
XDEF _Startup, MAIN_2, stateofelevator | |
; we use export 'Entry' as symbol. This allows us to | |
; reference 'Entry' either in the linker .prm file | |
; or from C/C++ later on | |
XDEF WAIT, CARRY, CRGINT, RTICTL, stateofelevator, NEXT_FLOOR | |
XDEF NEXT_FLOOR | |
XDEF INTERUPT, flag | |
xdef direction |
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
#add this to your .bashrc or .zshrc | |
# download ngrok https://ngrok.com/download | |
# I have it downloaded in my root directory | |
ngrok(){ | |
ngrok $* | |
} | |
# thats it pretty easy |
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
shopt -s extglob | |
alias ll='ls -la' | |
alias redis='cd ~; redis-server /usr/local/etc/redis.conf' | |
alias ll_bower='ls -la bower_components' | |
# gits! | |
alias gfa="git fetch --all; gs" | |
# alias grh='git reset --hard; gl 10; gs' |
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 requests ## you need to do a pip install requests | |
class database(object): | |
def __init__(self): | |
object.__init__(self) | |
self.baseUrl= "https://{YourDatabaseHere}.firebaseio.com/cars/" | |
# utilities | |
def urlBuilder(self,name="",color="",make="",year=0,parm=""): | |
car= self.makeTitle(name.lower(),color.lower(),make.lower(),year).replace(" ","%20") |
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 fs = require('fs'); | |
var file ="./nasty.json" | |
var nastystring; | |
exports.command = function () { | |
try { | |
var data = fs.readFileSync(require('path').resolve(__dirname + "/nasty.json"), 'utf8'); | |
nastystring =JSON.parse(data); | |
} catch(e) { | |
console.log('Error:', e.stack); |
NewerOlder