Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Cardona Rojas DanielCardonaRojas

View GitHub Profile
@Bersaelor
Bersaelor / Matrix4+Extensions.swift
Last active Sep 11, 2020
Applying SCNMatrix4 to SCNVector3 (Couldn't find this in SceneKit)
View Matrix4+Extensions.swift
//
// Matrix4+Extensions.swift
// StARs
//
// Created by Konrad Feiler on 17.12.17.
// Copyright © 2017 Konrad Feiler. All rights reserved.
//
import Foundation
import SceneKit
@mbigatti
mbigatti / UIView+FirstResponder.swift
Created Jul 10, 2014
A classical first responder finder using Swift.
View UIView+FirstResponder.swift
import UIKit
extension UIView {
func currentFirstResponder() -> UIResponder? {
if self.isFirstResponder() {
return self
}
for view in self.subviews {
if let responder = view.currentFirstResponder() {
@brikis98
brikis98 / echo.js
Last active Feb 15, 2019
Echo server in socket.io
View echo.js
var io = require('socket.io').listen(80);
io.sockets.on('connection', function (socket) {
console.log("Someone just connected!");
// Echo back messages from the client
socket.on('message', function (message) {
console.log("Got message: " + message);
socket.emit('message', message);
});