Skip to content

Instantly share code, notes, and snippets.

View charlesribeiro's full-sized avatar

charlesribeiro

  • Curitiba, Paraná, Brazil
  • 04:33 (UTC -03:00)
View GitHub Profile
@akirattii
akirattii / ShiftJISHankakuKanaToUnicode.js
Last active October 2, 2019 16:30
NodeJS: Shift_JISな半角カナのファイルを一行づつ読み込んで内容を正常に出力
const fs = require("fs");
const readline = require('readline');
const iconv = require('iconv-lite');
const readStream = fs.createReadStream("./shift_jis.txt", { encoding: "binary" });
const rl = readline.createInterface(readStream, {});
rl.on('line', function(line) {
// Shift_JIS => unicode:
console.log("line:", iconv.decode(new Buffer(line, "binary"), "Shift_JIS"));
@TheSalarKhan
TheSalarKhan / transform.py
Created March 23, 2016 22:19
Perspective transformation using Open CV and Python
# This script does a perspective transformation with an A4 paper
# Get an A4 sheet, put it on a table in front of your webcam
# just close enough so that all its corners are visible.
# Run this script, you will be given a frame from the webcam.
# Pick the corners of the A4 sheet for the software, by double clicking on its corners
# one by one in the following order: top left, top right, bottom left, bottom right.
# Just as you select the last corner, a live feed without the perspective distortion
# shows up and now you can write something on it, and have a view of it as if
# the camera was right on top of it. Cheers!
# visit:
@LouisBrunner
LouisBrunner / mupen64 Xbox360 Controller config
Last active October 3, 2025 16:31
Configuration for the Xbox360 controller to use with Nintendo 64 emulator mupen64
[Xbox 360 Wired Controller]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = "button(3)"
DPad L = "button(2)"
DPad D = "button(0)"
DPad U = "button(1)"