Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Tran extramaster

View GitHub Profile
View helloworldtwist.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 Jul 7, 2016
Better Python Standard Library Autocompletion for Notepad++
View python.xml
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>
@extramaster
extramaster / ArduinoChristmas.ino
Last active Dec 19, 2019
Arduino Christmas Tunes
View ArduinoChristmas.ino
/* 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
A Google Maps file (kml) of Building Points from The University of Sydney
View USyd.kml
<?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 Aug 29, 2015
Data for the locations of USyd Buildings
View USydBuildings.json
[{
"staffonly" : "false",
"id" : "548",
"name" : "1-3 Ross Street",
"geocode" : {
"latitude" : "-33.884591",
"longitude" : "151.184341"
},
"campus" : {
"name" : "Camperdown",
@extramaster
extramaster / _Paywall
Last active Feb 13, 2018
The Australian Paywall Bypass (Google Chrome)
@extramaster
extramaster / BigresourceBypass.user.js
Last active Dec 17, 2015
A script that will automatically bypass Bigresource.com, so that an accidental click on Google will still lead you straight to your answers
View BigresourceBypass.user.js
// ==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 Aug 15, 2019
Python notes to frequency script, and other winsound manipulation stuff
View beep.py
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 Apr 27, 2013
Autohotkey random text spammer
View SpamScript.ahk
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 Aug 2, 2018
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.
View extramaster'sBatchDownloader.vbs
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)))
You can’t perform that action at this time.