This file contains hidden or 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 os | |
| import sqlite3 | |
| import requests | |
| from collections import defaultdict | |
| def create_schema(): | |
| conn = sqlite3.connect('db.sqlite') | |
| c = conn.cursor() | |
| c.execute('''CREATE TABLE posts |
This file contains hidden or 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
| ~ ❱ cat .bin/open-iterm2 | |
| #!/usr/bin/env bash | |
| # Detects if iTerm2 is running | |
| if ! pgrep -f "iTerm" > /dev/null; then | |
| open -a "/Applications/iTerm.app" | |
| else | |
| # Create a new window | |
| if ! osascript -e 'tell application "iTerm2" to create window with default profile' > /dev/null; then | |
| # Get pids for any app with "iTerm" and kill |
This file contains hidden or 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 python3 | |
| import sys | |
| def check_args(): | |
| if len(sys.argv) != 2: | |
| print("Usage: python3 assembler.py <file.asm>") | |
| sys.exit(1) |
This file contains hidden or 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
| use std::time::Duration; | |
| use std::{env, io, fs, fmt}; | |
| use sdl2::Sdl; | |
| use sdl2::pixels::Color; | |
| use sdl2::render::Canvas; | |
| struct Instruction { | |
| bytes: [u8; 2], | |
| } |
This file contains hidden or 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
| 1 | 2 | 3 | |
|---|---|---|---|
| 4 | 5 | 6 | |
| 7 | 8 | 9 | |
| 0 | 0 | 0 |
OlderNewer