GitHub::SQL
has been released as an officially-maintained project and ruby gem: github/github-ds.
- GitHub Staff
- http://zerowidth.com
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
body { | |
--inline-code-padding: 2px; | |
--inline-code-border-radius: 4px; | |
} | |
/* inline code style */ | |
.cm-s-obsidian span.cm-inline-code, | |
.markdown-rendered code, | |
.markdown-preview-view code { | |
border: var(--tag-border-width) solid var(--background-modifier-border); |
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
require "set" | |
STDERR.sync | |
exclusion = 8 # one nether block distance, or 8 overworld | |
existing = [[-743, 63, -39], [-743, 63, -40]] | |
targets = [[-791, 152, -48], [-792, 152, -48], [-793, 152, -48]] | |
existing_nether = [[-87, 67, -4]] | |
search_from = existing_nether.first |
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 ruby | |
require "pathname" | |
class RandomEditor | |
def initialize | |
@files = Pathname.new(".").entries.select(&:file?).map(&:to_s) | |
end | |
def run(iterations = 1, commit = false) | |
iterations.times do |
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
# usbconfig -u 3 -a 3 dump_device_desc | |
ugen3.3: <Apple Keyboard Apple, Inc> at usbus3, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (20mA) | |
bLength = 0x0012 | |
bDescriptorType = 0x0001 | |
bcdUSB = 0x0200 | |
bDeviceClass = 0x0000 | |
bDeviceSubClass = 0x0000 | |
bDeviceProtocol = 0x0000 | |
bMaxPacketSize0 = 0x0008 |
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
# From https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour | |
# Write a program that outputs all possibilities to put + or - or nothing | |
# between the numbers 1, 2, ..., 9 (in this order) such that the result is | |
# always 100. For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 = 100. | |
# Hacky version: | |
["", "+", "-"].repeated_permutation(8).each do |operations| | |
string = (2..9).zip(operations).reduce("1") do |str, (operand, operator)| | |
"#{str}#{operator}#{operand}" | |
end |
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
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRA |= _BV(DDA0); | |
while(1) | |
{ | |
PORTA ^= _BV(PORTA0); | |
_delay_ms(500); |
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
# A demonstration/exploration of generating animation "frames" by combining | |
# objects that emit sequences of frames, with the following goals: | |
# | |
# * Declarative syntax for convenience and readability | |
# * Composability, for easily assembling larger animations from smaller pieces | |
# * Interruptability (see Flagged), so an animation sequence can be interrupted | |
# * Lazily-evaluated combinations so clock-based animations can be mixed. | |
# A top-level animation. | |
class Animation |
We have an excellent training team at GitHub, and they've produced a series of videos talking about the basics of how to use git and GitHub.
The youtube channel is here.
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
#!/bin/sh | |
set -e | |
# Add or modify any build steps you need here | |
cd "$(dirname "$0")" | |
ruby --version | |
mkdir -p ./gems |
NewerOlder