Skip to content

Instantly share code, notes, and snippets.

View raclettes's full-sized avatar
🏔️

Jacob MacKenzie-Websdale raclettes

🏔️
View GitHub Profile
@raclettes
raclettes / 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
@raclettes
raclettes / regex.txt
Created August 19, 2016 09:27
Regex for email addresses
([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)

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"
@raclettes
raclettes / 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
@raclettes
raclettes / 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"
}
@raclettes
raclettes / 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
@raclettes
raclettes / 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()
@raclettes
raclettes / 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}"
@raclettes
raclettes / 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