Skip to content

Instantly share code, notes, and snippets.

View tachoknight's full-sized avatar
🎯
Focusing

Ron Olson tachoknight

🎯
Focusing
View GitHub Profile
@sohayb
sohayb / ArrayDeepCopy.swift
Last active October 13, 2023 07:58
Array deep copy in Swift
//Protocal that copyable class should conform
protocol Copying {
init(original: Self)
}
//Concrete class extension
extension Copying {
func copy() -> Self {
return Self.init(original: self)
}
@alan-mushi
alan-mushi / fields_magic.c
Created July 29, 2014 10:05
Simple ncurses form example with fields that actually behaves like fields
/*
* Simple ncurses form example with fields that actually behaves like fields.
*
* How to run:
* gcc -Wall -Werror -g -pedantic -o test fields_magic.c -lform -lncurses
*/
#include <ncurses/ncurses.h>
#include <ncurses/form.h>
#include <assert.h>
#include <string.h>
@mschoebel
mschoebel / main.go
Created March 6, 2014 20:02
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling