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 "common.h" | |
#include <stdio.h> | |
int main(){ | |
char buffer[256] = {0}; | |
int read_size = 0; | |
char host[32] = {0}; | |
int port = -1; | |
scanf("%s %d", host, &port); |
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
CFLAGS=-Wall -g | |
INC=-I. | |
client: client.o common.o | |
gcc ${CFLAGS} ${INC} common.o client.o -o client | |
server: server.o common.o | |
gcc ${CFLAGS} ${INC} common.o server.o -o server |
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 ruby | |
require "net/http" | |
if ARGV.size != 1 | |
puts "Usage: #{__FILE__} <url>" | |
exit | |
end | |
@uri = URI(ARGV[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
#include <stdio.h> | |
int main(){ | |
int top, layers, growth, trh, trw, padding; | |
int i, j, k, curr_h; | |
printf("Tree Layers (2-5): "); | |
scanf("%d", &layers); | |
printf("Top Layer Height (3-6): "); | |
scanf("%d", &top); | |
printf("Growth Between Layer (1-5): "); |
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
; vim: ft=asm68k | |
.8051 | |
.include "tx3703.equ" | |
.org 0x00 | |
start: | |
mov P0OE, #0xFF | |
mov P0, #0xFF | |
mov CLKCON, #0x03 | |
sjmp main |
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 "tx3703.inc" | |
org 000h | |
start: | |
mov P0OE, #0xFF | |
mov P0, #0xFF | |
mov P2OE, #0x0F | |
mov P2, #0x0F | |
mov CLKCON, #0x03 | |
sjmp main |
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 "tx3703.inc" | |
org 00h | |
ajmp start | |
; some vars | |
D1 equ 41h ; 1s | |
D2 equ 42h ; 10s | |
; some consts | |
POS1 equ 0x70 |
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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
gem 'eventmachine' | |
gem 'faye', github: 'faye/faye' |
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
# Key Transition | |
I am transitioning my gpg key from an old 2048-bit RSA key to a new 4096-bit RSA key. | |
old key will be valid for some time. | |
Old key: | |
sec rsa2048 2016-06-25 [SC] | |
6E51A6DB4724DC2937D78AB895A7D60C79FD35B4 | |
uid [ultimate] Nightfeather <ss900328@gmail.com> |
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
require 'csv' | |
require 'time' | |
class EinvoiceRecord | |
attr_reader :state, :barcode, :date, :shop_id, :shop, :device, :device_id, :total, :items | |
def self.parse lines | |
result = [] | |
lines.each do |line| | |
case line.first |