Skip to content

Instantly share code, notes, and snippets.

flarn2006

Block or report user

Report or block flarn2006

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@flarn2006
flarn2006 / rainbow.v
Created Oct 1, 2019
Rainbow fading RGB LED in Verilog
View rainbow.v
module rainbow (
input clk,
output red,
output grn,
output blu,
);
reg [26:0] counter;
wire [11:0] t;
wire [11:0] cmp;
@flarn2006
flarn2006 / gt-reverse.js
Last active Oct 14, 2018
Reverse text button for Google Translate
View gt-reverse.js
// ==UserScript==
// @name Google U.G.E.
// @version 1.1
// @grant none
// @include https://translate.google.com/*
// ==/UserScript==
window.addEventListener('load', function() {
var btn = document.createElement('div');
btn.setAttribute('class', 'jfk-button-standard jfk-button-narrow jfk-button');
@flarn2006
flarn2006 / fakehash.patch
Created Jul 1, 2017
Patch for Git to use one-byte "SHA1" hashes
View fakehash.patch
diff --git a/sha1dc/sha1.c b/sha1dc/sha1.c
index 3a1735e..67cf753 100644
--- a/sha1dc/sha1.c
+++ b/sha1dc/sha1.c
@@ -1829,25 +1829,9 @@ int SHA1DCFinal(unsigned char output[20], SHA1_CTX *ctx)
ctx->buffer[63] = (unsigned char)(total);
sha1_process(ctx, (uint32_t*)(ctx->buffer));
output[0] = (unsigned char)(ctx->ihv[0] >> 24);
- output[1] = (unsigned char)(ctx->ihv[0] >> 16);
- output[2] = (unsigned char)(ctx->ihv[0] >> 8);
@flarn2006
flarn2006 / hexedit_vim_cursor.patch
Created Jan 4, 2017
Patch to add vim-like cursor movement to hexedit
View hexedit_vim_cursor.patch
--- interact.c_ 2016-11-03 16:19:44.646114334 -0400
+++ interact.c 2016-11-03 16:15:20.402249954 -0400
@@ -339,6 +339,25 @@
oldbase = base;
/*printf("*******%d******\n", key);*/
+ if (hexOrAscii) {
+ /* Hex-mode-only key binds */
+ switch (key)
+ {
@flarn2006
flarn2006 / icia.sh
Last active Dec 8, 2016
Easy QR CIA installer shell script
View icia.sh
#!/bin/bash
# Requirements:
# * qrencode <https://fukuchi.org/works/qrencode/> (apt-get install qrencode)
# * netcat <http://nc110.sourceforge.net/>
if [ -z "$1" ]; then
echo "Usage: $0 filename" >&2
exit 2
fi
@flarn2006
flarn2006 / ScreenTint.cs
Created Feb 4, 2016
Screen tinting code for C#
View ScreenTint.cs
// Created by flarn2006 <flarn2006@gmail.com>
// Licensed under MIT License
using System;
using System.Runtime.InteropServices;
namespace YourNamespaceHere //TODO: change me
{
static class ScreenTint
{
@flarn2006
flarn2006 / Makefile
Created Sep 29, 2015
3DS port of charsnow.c from flarn2006/MiscPrograms repo
View Makefile
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif
TOPDIR ?= $(CURDIR)
include $(DEVKITARM)/3ds_rules
@flarn2006
flarn2006 / KbdLedSpectrum.cpp
Created Sep 9, 2015
Logitech LED keyboard spectrum effect
View KbdLedSpectrum.cpp
#include <Windows.h>
#include <LogitechLEDLib.h>
enum ChannelState { CS_LOW, CS_RISING, CS_HIGH, CS_FALLING };
const ChannelState redStates[] = { CS_HIGH, CS_FALLING, CS_LOW, CS_LOW, CS_RISING, CS_HIGH };
const ChannelState greenStates[] = { CS_RISING, CS_HIGH, CS_HIGH, CS_FALLING, CS_LOW, CS_LOW };
const ChannelState blueStates[] = { CS_LOW, CS_LOW, CS_RISING, CS_HIGH, CS_HIGH, CS_FALLING };
DWORD red, green, blue;
@flarn2006
flarn2006 / Screenshots.prj.xml
Created Jun 21, 2015
Screenshot button for Google Translate (useful in Word Lens)
View Screenshots.prj.xml
<TaskerData sr="" dvi="1" tv="4.7m">
<dmetric>1080.0,1920.0</dmetric>
<Profile sr="prof18" ve="2">
<cdate>1428440396939</cdate>
<clp>true</clp>
<edate>1428440437425</edate>
<id>18</id>
<mid0>23</mid0>
<State sr="con0" ve="2">
<code>120</code>
@flarn2006
flarn2006 / noparamlimits.dif
Last active Aug 29, 2015
DFHack binpatch: Advanced worldgen param limits removal
View noparamlimits.dif
Dwarf Fortress.exe
001A9C3A: 89 90
001A9C3B: 01 90
001A9C46: 89 90
001A9C47: 30 90
001A9C62: 89 90
001A9C63: 08 90
001A9C82: 89 90
001A9C83: 08 90
You can’t perform that action at this time.