Skip to content

Instantly share code, notes, and snippets.

View kexoth's full-sized avatar

Aleksandar Kex Trpeski kexoth

View GitHub Profile
@interface NSManagedObject (Serialization)
- (NSDictionary*) toDictionary;
- (void) populateFromDictionary:(NSDictionary*)dict;
+ (NSManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict
inContext:(NSManagedObjectContext*)context;
@end
@kexoth
kexoth / gist:9646192
Last active August 29, 2015 13:57 — forked from ericchen/gist:3081970
var crypto = require('crypto');
var AESCrypt = {};
AESCrypt.decrypt = function(cryptkey, iv, encryptdata) {
encryptdata = new Buffer(encryptdata, 'base64').toString('binary');
var decipher = crypto.createDecipheriv('aes-128-cbc', cryptkey, iv),
decoded = decipher.update(encryptdata);
@kexoth
kexoth / LUA.lua
Created May 16, 2024 15:46 — forked from nilesh-tawari/LUA.lua
LUA cheatSheet
-- [[ Cheatsheet for LUA from http://www.newthinktank.com/2015/06/learn-lua-one-video/]]
-- Prints to the screen (Can end with semicolon)
print("Hello World")
--[[
Multiline comment
]]
-- Variable names can't start with a number, but can contain letters, numbers