Skip to content

Instantly share code, notes, and snippets.

@extramaster
extramaster / helloworldtwist.swift
Created September 7, 2016 11:18
Hello World in Swift
import Glibc
func splitme(a: String) {
let a = a.uppercaseString
for j in (a.characters.split{$0 == " "}.map(String.init)) {
for i in 0...j.characters.count-1 {
let jrange = j.startIndex.advancedBy(i)..<j.endIndex
let jarray = j[jrange].characters.map {String($0)}
print(jarray.joinWithSeparator(" "))
}
@extramaster
extramaster / python.xml
Created July 7, 2016 05:15
Better Python Standard Library Autocompletion for Notepad++
This file has been truncated, but you can view the full file.
<!-- URL: http://blog.extramaster.net/2016/07/better-python-standard-library.html -->
<?xml version="1.0" encoding="Windows-1252" ?>
<!--
@author Gregori Gerebtzoff, Andy Tran, Python Developers
@version 1.3
-->
<NotepadPlus>
<AutoComplete>
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," additionalWordChar = "." />
@extramaster
extramaster / ArduinoChristmas.ino
Last active December 15, 2023 14:10
Arduino Christmas Tunes
/* The MIT License (MIT)
*
* Copyright (c) 2015 Andy Tran
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@extramaster
extramaster / USyd.kml
Created May 19, 2015 14:05
A Google Maps file (kml) of Building Points from The University of Sydney
<?xml version="1.0" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Name>USyd Buildings</Name>
<Placemark>
<name>1-3 Ross Street</name>
<description>Campus: Camperdown&lt;br&gt;Building Code: K06</description>
<Point>
<coordinates>151.184341,-33.884591</coordinates>
</Point>
@extramaster
extramaster / USydBuildings.json
Last active August 29, 2015 14:21
Data for the locations of USyd Buildings
[{
"staffonly" : "false",
"id" : "548",
"name" : "1-3 Ross Street",
"geocode" : {
"latitude" : "-33.884591",
"longitude" : "151.184341"
},
"campus" : {
"name" : "Camperdown",
@extramaster
extramaster / _Paywall
Last active February 13, 2018 23:08
The Australian Paywall Bypass (Google Chrome)
_
@extramaster
extramaster / BigresourceBypass.user.js
Last active December 17, 2015 05:49
A script that will automatically bypass Bigresource.com, so that an accidental click on Google will still lead you straight to your answers
// ==UserScript==
// @name Bigresource.com Bypass
// @author eXtraMaster
// @namespace bigresourceisspam
// @copyright 2013, Andy Tran (http://twitter.com/extramaster)
// @license Licensed under the MIT license - http://opensource.org/licenses/mit-license.php
// @description A script that will automatically bypass Bigresource.com, so that an accidental click on Google will still lead you straight to your answers
// @include http*://*.bigresource.com/*
// @version 1.0
// @encoding UTF-8
@extramaster
extramaster / beep.py
Last active August 15, 2019 20:10
Python notes to frequency script, and other winsound manipulation stuff
from __future__ import division
import winsound
import time
import math
def notesTofreq(a,length,factor=1):
print "Notes function called"
if len(a)<1:
return False
a=a.replace("|","")
@extramaster
extramaster / SpamScript.ahk
Created April 27, 2013 03:36
Autohotkey random text spammer
Rand( a=0.0, b=1 ) {
IfEqual,a,,Random,,% r := b = 1 ? Rand(0,0xFFFFFFFF) : b
Else Random,r,a,b
Return r
}
Loop {
if GetKeyState("Capslock", "T")=false{
Random, charvar, 97, 122
Send % Chr(charvar)
if Rand()>0.9{
@extramaster
extramaster / extramaster'sBatchDownloader.vbs
Last active October 8, 2021 21:09
A simple visual basic script which takes a file (identified by it's filename) through a prompt, parses it for online links (separated by return characters) and downloads it.
Function ReplaceRegEx(origString,replaceString,replaceWith)
Set TempRegEx=New RegExp
TempRegEx.Pattern=replaceString
TempRegEx.IgnoreCase=True
ReplaceRegEx = TempRegEx.Replace(origString,replaceWith)
End Function
msgbox "Link Batch Downloader. Copyright (c) eXtraMaster, Andy Tran 2012, First Major scripting project in about a month..."
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objDictionary = CreateObject("Scripting.Dictionary")
currentDirectory = left(WScript.ScriptFullName,(Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))