Skip to content

Instantly share code, notes, and snippets.

View romyilano's full-sized avatar
😎
improving

Romy romyilano

😎
improving
View GitHub Profile
@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')
})
@romyilano
romyilano / atcoder.md
Last active May 19, 2019 22:19
tips for accepting input into atcoder

swift

cielavenir

let inputInt = Int(readline()!)!

let arrayInt = readlin()!.characters.split { $0== " " }.map { Int(String($0))! }
import Foundation
// async swift playground
import PlaygroundSupport
// https://min-api.cryptocompare.com/data/all/coinlist
let allCoinsPath = "/data/all/coinlist"
class CryptoApi {
// brushing up on url components
//
class CryptoApi {
static let host = "min-api.cryptocompare.com"
static let allCoinsPath = "/data/all/coinlist"
var allCoinsUrl: URL? = {
var urlComponents = URLComponents()
urlComponents.scheme = "https"
urlComponents.host = CryptoApi.host