Skip to content

Instantly share code, notes, and snippets.

View mwja's full-sized avatar
🏔️

Jacob A. MacKenzie-Websdale mwja

🏔️
View GitHub Profile
@mwja
mwja / regex.txt
Created August 14, 2016 22:30
Regex for web addresses
/(http(s)?:\/\/*)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g
@mwja
mwja / regex.txt
Created August 19, 2016 09:27
Regex for email addresses
([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)
@mwja
mwja / concept.md
Last active October 30, 2016 12:35

Dynamically typed language called Stitch (filetype .st or .stitch) based of Ruby, Python and JavaScript. Spaces are new lines (except for stringed spaces and other cases) which allows for minification. Comments are double quotes and multilined, while strings are single quotes.

To print hello: print('hello')

To get name and print hello $name

name=input('name: ')
print('hello (name)') "to actually print ( and ) do \( and \) respectively"
@mwja
mwja / script.stitch
Created October 29, 2016 11:09
Stitch program to automate dynamic up grabbing.
import('request')
import('io')
every(60000) io('ip.json')write(request.https('api.ipify.org?format=json') end
@mwja
mwja / Otter.otterproj
Last active February 2, 2017 08:03
A program written in Otter
{
"name": "Example Gist",
"depends": [
"Console",
"Stream",
"File"
],
"version": "0.0.0.1"
}
@mwja
mwja / code.md
Last active February 22, 2017 08:32
Tie lang
1 + 2 // 3
// int's class:
class int
  func +(value: int): int
    return CSharpMethods.pl(self, value)

Another idea:

1 + 2 // 3
@mwja
mwja / code.tie
Last active February 22, 2017 17:12
project of tie (using the final stated design) - just a web server app.
include("WebKit")
include("FileKit")
server: object = WebKit::establish("0.0.0.0", ~)
server.request: func = string | context : set |
if(context["path"].ends("/"))
context["path"] += "index.html"
FileKit::read(context["path"])
server.start()
@mwja
mwja / code.rb
Last active February 22, 2017 18:56
It's new Ruby, it's Tie
# Ruby is this:
print "name?: "
name = gets.chomp
puts "Hi #{name}"
# Tie is this, yes its type safe, but not OOP:
gets "name?: " |> name # string is inferred due to gets returning string
puts "Hi #{name}"
@mwja
mwja / hi.rb
Created February 23, 2017 08:23
Hi!
# use as require_relative "hi"
def hi(name)
puts "Hi #{name}, how you doing?"
end
import datetime
gss = input("guess? ")
def isornot(password):
global gss
if password == gss:
return True
else:
return False