Skip to content

Instantly share code, notes, and snippets.

Always keep at it

Jacob Goldberg jacob-g

Always keep at it
View GitHub Profile
jacob-g / acid.au3
Created May 30, 2020
ACID programming language - this is something I did in about 2010, just posting for historical value
View acid.au3
#cs ----------------------------------------------------------------------------
AutoIt Version:
Author: jvvg Industries Corporation
Script Function:
To create a programming interface.
Script Title:
Advanced Computer Integrated Development
jacob-g / LocalSettings-addition.php
Created Mar 6, 2018
Hiding Special:BlockList in MediaWiki
View LocalSettings-addition.php
//See for what I modeled this after
//add the following code to the end of your LocalSettings.php file
function restrictBlockList(&$list) {
global $wgUser;
if (!$wgUser->isAllowed('block')) {
jacob-g / hooks.php
Last active Aug 29, 2015
A sample of a FutureBB hooks file
View hooks.php
<?php //this example requires usernames to be >= 10 characters when registering
$hooks = array();
$hooks['review_registration'] = array(
function($args) {
global $errors;
if (strlen($args['username']) < 10) {
$errors[] = 'Your username must be >=10 characters';
return false;
View triangle.php
//sherpinski triangle fractal generator for PHP
//Copyright (C)2015 FutureSight Technologies - all rights reserved, do not copy
$iterations = input('Iterations?');;
$squaresize = input('Size?');
function input($prompt) {
echo $prompt . ' ';
$line = fgets(STDIN);
return (int)strtok($line, "\n");
jacob-g / topicindex.txt
Created Dec 10, 2013
This is a list of all of the topics that were on the Scratch 1.X forums. It is designed to find the ID using the subject.
View topicindex.txt
This file has been truncated, but you can view the full file.
100-Pronunciation Analysing-comparing for ESL students
1000-Right Here Waiting Karaoke
10000-subject of projects
100001-PeteCraft [BukkitPro Needed] [Hamachi]
100002-Sprite Problems
100003-Fighting with a different style.
100004-Want to Add one of Your Projects to our Project Library Today?
100005-Basketball Engine Collaboration
jacob-g / wikicounter.php
Created Sep 16, 2013
Improved Scratch Wiki Vote Counter (PHP) - algorithm based on blob8108's, but implemented in PHP
View wikicounter.php
$data = file_get_contents('' . md5(time()));
$xml = new SimpleXMLElement($data);
$votes = (string) ($xml->query->pages->page->revisions->rev);
$lines = explode("\n", $votes);
$vote_lines = array();
foreach ($lines as $val) {
if (preg_match('%^\| *[A-z]%msi', $val)) {
$vote_lines[] = $val;
jacob-g / getposts.php
Created Sep 15, 2013
This is the code to convert the Scratch Forums into HTML pages. The file topics.txt must be writable and in the same directory as getposts.php, and a writable directory called "res" must also be in the same directory as getposts.php. The results will appear in the format res/*id*/page-*page*.html (e.g. topic 5 page 3 would appear as res/5/page-3…
View getposts.php
function percentbar($pct) {
$pct = floor($pct);
$half = false;
for ($j = 1; $j <= 50; $j++) {
if ($j > 22 && $j < 27) {
if (!$half) {
echo '[' . sprintf('%2d', $pct) . '%]';
$half = true;