Skip to content

Instantly share code, notes, and snippets.

View pat36's full-sized avatar
🐉
fighting dragons

pat36

🐉
fighting dragons
View GitHub Profile
[{"id": 1, "series_name": "[ratatatat74] Discipline [Shitty_Translate] English", "pages": ["https://i.imgur.com/zFQIDid.jpg", "https://i.imgur.com/xAQvPAu.jpg", "https://i.imgur.com/v81yp4c.jpg", "https://i.imgur.com/biLyldu.jpg", "https://i.imgur.com/eao6sEV.jpg", "https://i.imgur.com/9PKhejg.jpg", "https://i.imgur.com/6htIvPg.jpg", "https://i.imgur.com/wHQ9erW.jpg", "https://i.imgur.com/XlMPDCN.jpg", "https://i.imgur.com/OBZc6tq.jpg", "https://i.imgur.com/h81NFlh.jpg", "https://i.imgur.com/gTkYwQQ.jpg", "https://i.imgur.com/c3WmuBj.jpg", "https://i.imgur.com/QCUI9IB.jpg", "https://i.imgur.com/YwIoLF3.jpg", "https://i.imgur.com/TiyN2gk.jpg", "https://i.imgur.com/kQiSzXp.jpg", "https://i.imgur.com/RSTJpEy.jpg", "https://i.imgur.com/pCcSf04.jpg", "https://i.imgur.com/dbtJAG8.jpg", "https://i.imgur.com/JfUgrdh.jpg", "https://i.imgur.com/4jTJ6Ls.jpg"]}, {"id": 2, "series_name": "Write Sisters - c1", "pages": ["https://i.imgur.com/U8pg4Wn.jpg", "https://i.imgur.com/pRMspak.jpg", "https://i.imgur.com/6lZHxA9.jpg",
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#define HEIGHT 640
#define WIDTH 480
#define FIELDS 3
int main(int argc, char** argv) {
FILE* f_img;
@pat36
pat36 / boot.asm
Created June 22, 2018 17:24 — forked from lpsantil/boot.asm
; src/boot/boot.asm
; Bootloader to load kernel, switch to 32-bit protected mode and execute kernel
[BITS 16] ; 16-bit real mode
[ORG 0x7C00] ; Loaded into memory at 0x7C00
MOV [bootDrive], DL ; Store DL (boot drive number) in memory
MOV BP, 0x9000 ; Move Base Pointer in free memory space
MOV SP, BP ; Move Stack Pointer to base of stack
@pat36
pat36 / scrape_reddit_w_R.r
Created April 19, 2018 21:06 — forked from dmarx/scrape_reddit_w_R.r
Demo code showing how to collect analyze the subreddits a particular user has participated in, using R sintead of python (praw). I don't believe the code is exiting when it should, but this should at least serve as a jumping off point from the person who asked for help: http://www.reddit.com/r/rstats/comments/1tq4au/accessing_the_reddit_api_thro…
#install.packages("rjson","RCurl")
library(RCurl)
library(rjson)
get_User_subs_page = function(user, after=NULL, cache=c()){
baseurl = "http://www.reddit.com/user/"
params = "limit=100"
if(!is.null(after)){
params = paste(params, "&after=",after, sep="")
@pat36
pat36 / post-receive.rb
Created April 15, 2018 17:42 — forked from FarMcKon/post-receive.rb
Git post-receive hook that broadcasts commit messages via jabber
# post-receive
#
# Broadcast commit messages when pushed to the repositories master branch.
#
#== Git Configuration Example
# [notify]
# jabber = foo bar
#
require 'rubygems'
require 'jabber4r/jabber4r'
@pat36
pat36 / nginx.conf
Created March 29, 2018 20:50 — forked from hjr3/nginx.conf
nginx phpfpm + CORS configuration
upstream phpfpm {
server 127.0.0.1:9000;
}
server {
listen 80;
server_name _;
root /var/www/html;
index index.php;
@pat36
pat36 / ping.py
Created March 22, 2018 18:18 — forked from pklaus/ping.py
A pure python ping implementation using raw socket.
#!/usr/bin/env python2
"""
Other Repositories of python-ping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* https://github.com/l4m3rx/python-ping supports Python2 and Python3
* https://bitbucket.org/delroth/python-ping
@pat36
pat36 / Test.c
Created January 8, 2018 14:59 — forked from khalladay/Test.c
DevKitPro Test
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
#define REG_DISPLAYCONTROL *((volatile uint32*)(0x04000000))
#define VIDEOMODE_3 0x0003
#define BGMODE_2 0x0400
#define SCREENBUFFER ((volatile uint16*)0x06000000)
#define SCREEN_W 240
@pat36
pat36 / ffmpeg-vp8&9-encode-test-vaapi-intel.md
Created December 12, 2017 19:58 — forked from Brainiarc7/ffmpeg-vp8&9-encode-test-vaapi-intel.md
PSA: You can now use FFmpeg's VAAPI-based VP8 and VP9 encoder on Skylake+ systems on Linux: Tested on Ubuntu 16.04LTS

Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:

Build platform: Ubuntu 16.04LTS.

First things first:

Build the dependency chain first.

  1. cmrt:
import ipfsapi
import json
ipfs = ipfsapi.connect()
# JSON:
# { "data" : "something...", "previousBlock" : "ipfs hash to previous block"}
# genesisHash is "Qm00000000000000000000000000000000000000000000"
# when previousBlock == genesisHash then we reached the first block
genesisHash = "Qm00000000000000000000000000000000000000000000"