Skip to content

Instantly share code, notes, and snippets.

View romyilano's full-sized avatar
😎
improving

Romy romyilano

😎
improving
View GitHub Profile
@romyilano
romyilano / mermaid.md
Last active January 16, 2024 23:44
Drawing mermaid state machine diagrams

Add a space in a state name

stateDiagram
    classDef yourState font-style:italic,font-weight:bold,fill:white

    yswsii: Your state with spaces in it
 [*] --> yswsii:::yourState
@romyilano
romyilano / documentation.md
Last active September 28, 2023 23:16
swift memory review
  • arrays and variable-size collections use copy-on-write optimization
  • multiple copies of an array share the same storage
@romyilano
romyilano / skew.swift
Created April 10, 2022 19:49
Creating a skew in SpriteKit
// https://stackoverflow.com/a/43532815/1492368
extension SKSpriteNode {
func addSkew(value: CGFloat = -1){
var effectNode = SKEffectNode()
effectNode.shouldRasterize = true
effectNode.shouldEnableEffects = true
effectNode.addChild(SKSpriteNode(texture: texture))
@romyilano
romyilano / RustNotes.md
Last active October 24, 2020 17:08
Rust Saturday Morning Fun
@romyilano
romyilano / helloworld.js
Created March 27, 2020 17:21
Basic noob web server on node.js
// from O'Reilly Web Dev with Node & Express
const http = require('http')
const fs = require('fs')
const port = process.env.PORT || 3000
function serveStaticFile(res, path, contentType, responseCode = 200) {
fs.readFile(__dirname + path, (err, data) => {
if(err) {
res.writeHead(500, { 'Content-Type': 'text/plain' })
@romyilano
romyilano / .gitattributes
Created March 24, 2020 17:54 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@romyilano
romyilano / Unitymac.gitignore
Created March 24, 2020 17:37
Unity + Mac gitignore
# Unity gitignore is from : https://github.com/github/gitignore/blob/master/Unity.gitignore
# Created by https://www.gitignore.io/api/osx
# Edit at https://www.gitignore.io/?templates=osx
### OSX ###
# General
.DS_Store
.AppleDouble
.LSOverride
@romyilano
romyilano / gist:7fec2598d347a2c309655ca8f7467244
Created February 26, 2020 23:06 — forked from sabarasaba/gist:3080590
Remove directory from remote repository after adding them to .gitignore
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@romyilano
romyilano / helloworld.js
Created November 29, 2019 15:26
son you must learn javascript again. at least this doesn't have all those semicolons =D
// nice quick and dirty webserver
const http = require('http')
const port = process.env.PORT || 3000
const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain '})
res.end('Hello world! this is a noob server')
})