Rust is a ahead of time compile language. What is llvm the power behind swift rust clang and more
fn main() {
// ! means it's a macro
println!("Hello, World!");
}
// 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)) |
Rust is a ahead of time compile language. What is llvm the power behind swift rust clang and more
fn main() {
// ! means it's a macro
println!("Hello, World!");
}
// 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' }) |
## 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 |
# 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 |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
// 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') | |
}) |
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 |