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
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
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 urllib import request | |
from json import load | |
from datetime import datetime, timezone, timedelta | |
from os import system | |
from time import sleep | |
routes = [ | |
'32', '36', '40E', '40P', '40X', '46P', '46X', '47A', | |
'47X', '48X', '73D', '73P', '73X', '936', 'N36', 'N48', |
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
words = [ | |
"complete", | |
"notice", | |
"common", | |
"surface", | |
"pattern", | |
"tiny", | |
"care", | |
"addition", | |
"check", |
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
@font-face { | |
font-family:"Cubic 11"; | |
src: url("https://github.com/ACh-K/Cubic-11/blob/main/fonts/web/Cubic_11_1.010_R.woff2?raw=true") format("woff2"); | |
} | |
/* cyrillic-ext */ | |
@font-face { | |
font-family: 'Press Start 2P'; | |
font-style: normal; | |
font-weight: 400; |
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
javascript:(function(){ | |
let tables = document.getElementsByTagName("table"); | |
for (let table of tables) { | |
let stores = []; | |
const rows = table.tBodies[0].children; | |
for (let row of rows) { | |
const rowValue = row.children[0].innerText; | |
const matches = rowValue.match( | |
/^ +(\S+) +(\S+) +(\S+|\d\S\s{2}\S+) +(\d{1,2}\/\d{1,2}) .+(\d{2}-\d{2}) +(\d{2}:\d{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
#!/usr/bin/env osascript -l JavaScript | |
/* | |
* [resource](https://github.com/JXA-Cookbook/JXA-Cookbook/wiki) | |
*/ | |
const app = Application.currentApplication(); | |
// allow to use `chooseFile` and `chooseFolder` methods | |
app.includeStandardAdditions = 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
javascript:(function sortTable(){ | |
let tables = document.getElementsByTagName("table"); | |
for (let table of tables) { | |
let stores = []; | |
const rows = table.tBodies[0].children; | |
for(let row of rows){ | |
const rowValue = row.children[0].innerText; | |
const matches = rowValue.match( | |
/^ +(\S+) +(\S+) +(\S+|\d\S\s{2}\S+) +(\d{1,2}\/\d{1,2}) .+(\d{2}-\d{2}) +(\d{2}:\d{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
function split_pdf -a pdf -d "split a PDF file" | |
set -l options (fish_opt -s n -l noOfPages --required-val) | |
set options $options (fish_opt -s l -l list --required-val) | |
set options $options (fish_opt -s d -l dpi --required-val) | |
set options $options (fish_opt -s h -l help) | |
argparse --name="split_pdf" $options -- $argv | |
or return | |
if set -q _flag_help |
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 smbus2 import SMBus | |
from time import sleep | |
# datasheet: https://www.sparkfun.com/datasheets/Sensors/Temperature/MLX90614_rev001.pdf | |
class GY906(): | |
AMBIENT_TEMP_REGISTER = 0x06 | |
OBJECT1_TEMP_REGISTER = 0x07 | |
def __init__(self, bus, address): | |
self.bus = bus |
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 system | |
board = [[15, 14, 13, 12], [11, 10, 9, 8], [7, 6, 5, 4], [3, 1, 2, 0]] | |
answer = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 0]] | |
r, c = 3, 3 | |
step = 0 | |
def print_row(row): | |
for cell in row: | |
if cell != 0: |
NewerOlder