Skip to content

Instantly share code, notes, and snippets.

View kexoth's full-sized avatar

Aleksandar Kex Trpeski kexoth

View GitHub Profile
@return1
return1 / trim_enabler.txt
Last active May 26, 2024 11:01
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@spilliams
spilliams / SWAppDelegate.h
Created January 18, 2013 02:08
lock state notifications test
//
// SWAppDelegate.h
// lockstatenotificationstest
//
// Created by Spencer Williams on 1/17/13.
// Copyright (c) 2013 Spencer Williams. All rights reserved.
//
#import <UIKit/UIKit.h>
@nuthatch
nuthatch / NSManagedObject+Serialization.h
Last active May 8, 2019 11:25 — forked from pkclsoft/NSManagedObject+Serialization.h
Fixes for Peter Easdown's category 1. don't assume each Entity name matches the Class name. 2. strip DATE_ATTR_PREFIX when deserializing dates back into NSManagedObject 3. add support for NSOrderedSet 4. use set to keep traversal history, and allow classes to opt-out with serializationObjectsToSkip
@interface NSManagedObject (Serialization)
- (NSDictionary*) toDictionary;
- (void) populateFromDictionary:(NSDictionary*)dict;
+ (NSManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict
inContext:(NSManagedObjectContext*)context;
@end
@hpique
hpique / iOS7-notifications.h
Last active January 29, 2018 14:19
List of all public notifications available in iOS 7.0 (or at least those whose constants are properly named).
// Developer/Library/Frameworks/SenTestingKit.framework/Headers/SenTestCaseRun.h
SENTEST_EXPORT NSString * const SenTestCaseDidStartNotification;
SENTEST_EXPORT NSString * const SenTestCaseDidStopNotification;
SENTEST_EXPORT NSString * const SenTestCaseDidFailNotification;
// Developer/Library/Frameworks/SenTestingKit.framework/Headers/SenTestDistributedNotifier.h
SENTEST_EXPORT NSString * const SenTestNotificationIdentifierKey;
// Developer/Library/Frameworks/SenTestingKit.framework/Headers/SenTestSuiteRun.h
SENTEST_EXPORT NSString * const SenTestSuiteDidStartNotification;
@nikolamin
nikolamin / CountLinesOfCode.lua
Created June 10, 2014 01:40
CountLinesOfCode
------------------------------------
-- Author: Nikola Minoski - June 2014
-- Done in competition with Kex
-- Competition: Swift vs Lua
------------------------------------
if #arg < 2 then
print "Usange: count_src_lines.lua <path_to_project_src_dir> <src_code_ext1> [<src_code_ext2 [...]]"
os.exit()
end
@bor0
bor0 / CountLinesOfCode.hs
Last active August 29, 2015 14:02
CountLinesOfCode
import System.Directory
import Control.Monad (filterM, mapM, liftM)
import System.FilePath ((</>))
getDirsRec :: FilePath -> IO [FilePath]
getDirsRec d = do
dirContents <- getDirectoryContents d
let dirContents' = [ d </> x | x <- dirContents, x /= ".", x /= ".." ]
dirs' <- mapM dirRec dirContents'
return (concat dirs' ++ [d])
@kzkin
kzkin / phoenix-app.service
Last active October 30, 2018 19:16
systemd service for phoenix framework release (exrm)
# Phoenix Framework - A productive web framework that does not compromise speed and maintainability
[Unit]
Description=Phoenix Framework ISControl Application
After=network.target
[Service]
Type=simple
User=deployer
RemainAfterExit=yes
@yang-wei
yang-wei / destructuring.md
Last active February 20, 2024 04:40
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@inamiy
inamiy / SwiftElmFrameworkList.md
Last active March 11, 2024 10:20
React & Elm inspired frameworks in Swift
@nilesh-tawari
nilesh-tawari / LUA.lua
Created January 25, 2018 04:11
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