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
// BSD-16 | |
// From: en.wikipedia.org/wiki/BSD_checksum | |
function bsd16(data) { | |
for(var i = 0, c = 0; i < data.length; i++) { | |
c = (c>>1) + ((c&1) << 15); | |
c += data[i]; | |
c &= 0xffff; | |
} | |
return c; | |
} |
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
//Compile using csc test.cs | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Linq; | |
public class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
$Files = Get-ChildItem -Path ".\*.m3u" | |
$Total = $Files.count | |
$Text = "" | |
for ($i = 0; $i -lt $Total; $i++) { | |
$Path = Get-Content $Files[$i] | |
Write-Host $Path | |
$Text += $Path + "`n" | |
} |
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
<style>body{margin:0}div{padding:8px;color:rgba(255,255,255,.5);text-align:center;font:bold 48px sans-serif; -webkit-text-stroke: 0.8px rgba(0,0,0,.75);}</style> | |
<script> | |
var colourNames = ["Pink","LightPink","HotPink","DeepPink","PaleVioletRed","MediumVioletRed","LightSalmon","Salmon","DarkSalmon","LightCoral","IndianRed","Crimson","FireBrick","DarkRed","Red","OrangeRed","Tomato","Coral","DarkOrange","Orange","Yellow","LightYellow","LemonChiffon","LightGoldenrodYellow","PapayaWhip","Moccasin","PeachPuff","PaleGoldenrod","Khaki","DarkKhaki","Gold","Cornsilk","BlanchedAlmond","Bisque","NavajoWhite","Wheat","BurlyWood","Tan","RosyBrown","SandyBrown","Goldenrod","DarkGoldenrod","Peru","Chocolate","SaddleBrown","Sienna","Brown","Maroon","DarkOliveGreen","Olive","OliveDrab","YellowGreen","LimeGreen","Lime","LawnGreen","Chartreuse","GreenYellow","SpringGreen","MediumSpringGreen","LightGreen","PaleGreen","DarkSeaGreen","MediumSeaGreen","SeaGreen","ForestGreen","Green","DarkGreen","MediumAquamarine","Aqua","Cyan" |
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
/* Just a tool for converting space-delimited decimal values to hex. */ | |
var NonclientMetrics = "88 1 0 0 7 0 0 0 17 0 0 0 17 0 0 0 18 0 0 0 23 0 0 0 240 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 188 2 0 0 1 0 0 0 0 0 5 0 85 98 117 110 116 117 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 8 0 0 0 253 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 5 0 83 109 97 108 108 32 70 111 110 116 115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 18 0 0 0 18 0 0 0 248 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 0 0 0 0 0 0 0 0 5 0 85 98 117 110 116 117 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 244 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 188 2 0 0 1 0 0 0 0 0 5 0 85 98 117 110 116 117 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 235 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 188 2 0 0 1 0 0 0 0 0 5 0 85 98 117 110 116 117 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0"; | |
var IconMetrics = "76 0 0 0 122 0 0 0 46 0 0 0 1 0 0 0 247 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 144 1 |
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
/* | |
zelschk | |
legend of zelda (nes) sram checksum updater/checker | |
16/03/2015 - bryc | |
*/ | |
#include <stdio.h> | |
unsigned char data[8192]; | |
FILE *fp; |
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
windres reg.rc -O coff -o reg.res | |
g++ -c reg.cpp | |
g++ -o reg.exe reg.o reg.res |
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
// #### ARRAY <-> STRING CONVERSION #### | |
// b62 - reversible base62 encoder/decoder in two lines. | |
function b62(n,c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"){var r="",l=c.length,i=0; | |
if(n.trim)while(i<n.length)r=l*r+c.indexOf(n[i++]);else while(n>0)r=c[n%l]+r,n=Math.floor(n/l);return r} | |
// arst is a reversible string<>array utility in one line. It converts a string to an array of integers and back. | |
// ES6 (shorter) | |
arst=a=>{return a.trim?[...a].map(a=>a.charCodeAt()):String.fromCharCode.apply(0,a)} |
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
REM 2016 NOTE: USE fscanf() in future C projects! | |
@echo off | |
echo Compiling... | |
cd C:\mingw\bin | |
gcc -s -O3 -o ..\src\build\%~n1.exe %1 | |
echo Done. | |
pause |
NewerOlder