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
| // | |
| //======================================================================= | |
| // NOTICE -- this program has stopped working, please refer to this gist: | |
| // https://gist.github.com/sug0/79680851924800d24f393978a08e9bc7 | |
| //======================================================================= | |
| // | |
| package main | |
| import ( |
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 <stdlib.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <netdb.h> | |
| #include <goio.h> |
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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <signal.h> | |
| #include <sys/wait.h> | |
| /* configurable constants */ | |
| #define TIME_MAX 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
| (define-macro (pattern-match expr) | |
| (local (e u m p) | |
| (setq e (eval expr)) | |
| (dolist (pat (args) (!= u nil)) | |
| (setq p (pat 0)) | |
| (setq m (pat 1)) | |
| (setq u (unify p e))) | |
| (if (!= u nil) | |
| (eval (list | |
| 'let |
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
| package main | |
| import ( | |
| "net" | |
| "log" | |
| "flag" | |
| "github.com/mdlayher/arp" | |
| ) |
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
| package JSON::Schema; | |
| use strict; | |
| use warnings; | |
| use Scalar::Util qw(looks_like_number); | |
| use Exporter; | |
| # inherit this package | |
| our @ISA = qw(Exporter); |
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
| package main | |
| import ( | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "net/http" | |
| "context" | |
| "sync" | |
| "time" |
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::io::{self, Read, Write}; | |
| use std::fs; | |
| use std::env; | |
| use std::process; | |
| enum Input { | |
| Stdin(io::Stdin), | |
| File(fs::File), | |
| } |
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::mem; | |
| use std::slice; | |
| use std::io::{self, Write}; | |
| macro_rules! to16 { | |
| ($n:expr) => ( | |
| (($n as u16) << 8) | (($n as u16) & 0xff) | |
| ); | |
| } |
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 sqlite3 | |
| import json | |
| if __name__ == '__main__': | |
| with sqlite3.connect('newpipe.db') as conn: | |
| c = conn.cursor() | |
| playlists = { id:{'name':name, 'tracks':[]} for id, name, _ in \ | |
| c.execute('select * from playlists') } |