Skip to content

Instantly share code, notes, and snippets.

View Anime4000's full-sized avatar

Anime4000

View GitHub Profile
@Anime4000
Anime4000 / htaccess
Last active August 29, 2015 14:08 — forked from dave1010/htaccess
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'
@Anime4000
Anime4000 / package.sh
Created September 23, 2015 13:30 — forked from shilrobot/package.sh
Making mkbundle work on Windows
#!/bin/bash
# If this doesn't work, ensure you have UNIX line endings in this file
# (\n, not \r\n.) You can use Notepad++ to switch them.
# Cygwin package requirements: gcc-mingw, pkg-config
# If you want to pass -z to mkbundle: mingw-zlib1, mingw-zlib-devel
# crash immediately if anything bad happens
set -o errexit
set -o nounset
@Anime4000
Anime4000 / compile.sh
Created October 12, 2015 00:01
mkbundle Mono 4.0 and Cygwin (32bit mode)
#!/bin/sh
# Run this on Cygwin Terminal
#
# Required:
# 1. gcc-mingw
# 2. pkg-config
# 3. mingw-zlib1
# 4. mingw-zlib-devel
#
@Anime4000
Anime4000 / iodine-ios.sh
Last active November 18, 2015 01:37
Iodine iOS
#!/bin/bash
# This script used for iodine in iOS
# Required:
# Unix command
# Network Commands
# iodine
# Readme:
# iodine has 2 mode:
@echo off
@title IODINE
cd "%~dp0"
SET NS=ENTER IODINE NAME SERVER HERE
SET HOST=ENTER IODINE SERVER IP HERE
::SET DNS=58.71.132.10
SET DNS=1.9.1.9
SET MASK=255.255.255.255
for /f "tokens=2,3 delims={,}" %%a in ('"WMIC NICConfig where IPEnabled="True" get DefaultIPGateway /value | find "I" "') do set GATE=%%~a
RELICCOH started at 2015-12-28 15:53
OS NT 6.1 (sp1.0) x64, 16381MB Physical Memory, 14324 Physical Available, 3953 Virtual Available
RUN-OPTIONS -refresh 60 -nomovies
WORKING-DIR E:\Program Files\Steam\steamapps\common\Company of Heroes Relaunch
USER Anime4000
15:53:58.03 6 Logical Processors detected
15:53:58.03 Multithreading Enabled
15:53:58.03 THREAD: Hyper-Threading Technology Processors are not detected.
15:53:58.03 XTHREAD: Detected 6 core(s) with 6 hardware thread(s)
[Configuration]
FontName=Terminus 10
ColorForeground=#b7b7b7
ColorBackground=#000000
ColorPalette=#000000;#aa0000;#44aa44;#aa5500;#0039aa;#aa22aa;#1a92aa;#aaaaaa;#777777;#ff8787;#4ce64c;#ded82c;#295fcc;#cc58cc;#4ccce6;#ffffff
ColorSelection=#163b59
ColorSelectionUseDefault=FALSE
ColorCursor=#0f4999
ColorBold=#ffffff
ColorBoldUseDefault=FALSE
bind "v" "sv_cheats 1;noclip;sv_cheats 0"
bind "0" "npc_create npc_barnacle"
bind "-" "npc_create npc_zombie"
bind "=" "npc_create npc_headcrab"
bind "p" "sv_cheats 1;npc_create_equipment weapon_rpg;npc_create npc_monk;sv_cheats 0"
bind "[" "sv_cheats 1;npc_create_equipment weapon_ar2;npc_create npc_monk;sv_cheats 0"
bind "]" "sv_cheats 1;npc_create_equipment weapon_rpg;npc_create npc_citizen;sv_cheats 0"
bind "\" "sv_cheats 1;npc_create_equipment weapon_ar2;npc_create npc_citizen;sv_cheats 0"
@Anime4000
Anime4000 / avx.c
Last active October 12, 2017 07:00
Do floating point math by using AVX feature in x86 CPU
/*
Copyright (c) CureComp Technology Trading & Services
Generic vs AVX
--------------
Show how fast and how accurate CPU processing,
3 GHz Generic vs 1.8 GHz AVX
*/
@Anime4000
Anime4000 / computehash.cs
Last active February 3, 2018 03:24
Calculate Object into SHA256, use for blockchain database
using System.Text;
using System.Security.Cryptography;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
class Compute
{
public static string BlockHash(object obj)
{
using (SHA256Managed sha256 = new SHA256Managed())