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
| import re | |
| import sys | |
| if len(sys.argv) != 3: | |
| print(f' usage: {sys.argv[0]:s} <declaration file> <name>') | |
| sys.exit(0) | |
| array_re = re.compile( "([A-Za-z_ ]+) +([a-zA-Z0-9_]+)\[([0-9]+)\];?\n" ) | |
| value_re = re.compile( "([A-Za-z_ ]+) +([a-zA-Z0-9_]+);?\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
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <assert.h> | |
| #include <random> | |
| #include <limits> | |
| #ifdef __unix__ | |
| #include <pthread.h> | |
| #endif |
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
| // Single Header Library for Simple Cross-Platform Threading | |
| // | |
| // sthread_handle handle; | |
| // STHREAD_CREATE(handle, Func, &argument ); | |
| // STHREAD_JOIN(handle); | |
| // STHREAD_DESTROY(handle); | |
| // | |
| // STHREAD_RETVAL Func( void* pArguments ) | |
| // { | |
| // // Do Work Here |
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
| ^d:: | |
| Send {+Home} | |
| Send ^c | |
| Send {End} | |
| RegExMatch(clipboard, "(\d+)$", SubPat) | |
| StringRight, lastDigit, SubPat, 1 | |
| if( SubPat == "11" || SubPat == "12" || SubPat == "13" ) | |
| { | |
| Send, th | |
| } |
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
| Commands for adding the Internalization Commands (copy whole line and paste into chat) | |
| !addcom -cd=5 !perc $(eval t='nick';vs=`$(query)`;if(vs.split(' ').length>1){t=`$(1)`;vs=`$(2)`;a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=$(1)&user=$(user)&value=$(2))`;}else{a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=nick&user=$(user)&value=$(1))`;}v=Math.min(Math.max(parseInt(vs,10)|0,0),100);t=t[0].toUpperCase()+t.slice(1);`$(user) added `+v+`% to `+t+`'s Internalization`) | |
| !commands add !perc_reset -ul=moderator -cd=5 $(eval t='nick';if(`$(query)`.length>0){t=`$(1)`;a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=$(1)&clear=all)`;}else{a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=nick&clear=all)`;}t=t[0].toUpperCase()+t.slice(1);t+`'s Internalization has been reset`) | |
| !commands add !perc_get -ul= |
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
| import sys,os | |
| import subprocess | |
| types = { 'int' : '%d', | |
| 'long' : '%ld', | |
| 'long long' : '%lld', | |
| 'float' : '%.32f', | |
| 'double' : '%.56f', | |
| 'unsigned' : '%u', | |
| 'unsigned long' : '%lu', |
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
| Number.prototype.pad = function(size) { | |
| var s = String(this); | |
| while (s.length < (size || 2)) {s = "0" + s;} | |
| return s; | |
| } | |
| if( document.URL.endsWith('/input') ) | |
| { | |
| var url_sans_input = document.URL.slice(0,document.URL.lastIndexOf('/')) | |
| var day_num = parseInt(url_sans_input.slice(url_sans_input.lastIndexOf('/')+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
| // | |
| // evaluate() evaluates an expression passed in as a char array using the Lua scripting language | |
| // The expression may reference a set of floating-point variables past in as an pair of | |
| // arrays corresponding to the key, or name, of the variable and its value. | |
| // | |
| // Tested with Lua-5.4.0 | |
| // | |
| // Depends on stb_ds.h from https://github.com/nothings/stb | |
| #define STB_DS_IMPLEMENTATION |
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
| var layerSetText = app.activeDocument.layerSets.getByName("GROUPNAME") | |
| for (var i=0; i<layerSetText.artLayers.length; i++) { | |
| var col = new SolidColor(); | |
| var grayCol = new GrayColor(); | |
| grayCol.gray = i*100.0/(layerSetText.artLayers.length-1); | |
| col.gray = grayCol; | |
| layerSetText.artLayers[i].textItem.color = col; | |
| } |
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
| // simple float / safe float (WIP) | |
| // | |
| // For when you want your math to be real with you | |
| // | |
| // drop-in replacement for a IEEE single-precision float that | |
| // maintains a real-number | |
| // | |
| // Optionally define SFLOAT_ABORT_NONREAL fail on first occurance | |
| // of a non-real number | |
| // |