Skip to content

Instantly share code, notes, and snippets.

View nonelse's full-sized avatar

Pedro Filipe nonelse

  • adjust GmbH
  • Germany
View GitHub Profile
@OliverJAsh
OliverJAsh / foo.ts
Last active January 27, 2025 18:24
Records and dictionaries in TypeScript
/*
In JavaScript, objects can be used to serve various purposes.
To maximise our usage of the type system, we should assign different types to our objects depending
on the desired purpose.
In this blog post I will clarify two common purposes for objects known as records and dictionaries
(aka maps), and how they can both be used with regards to the type system.
@joyrexus
joyrexus / README.md
Last active December 30, 2024 01:37
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@0xjac
0xjac / private_fork.md
Last active April 29, 2025 13:02
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@wojteklu
wojteklu / clean_code.md
Last active April 29, 2025 11:05
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@jspahrsummers
jspahrsummers / bad.m
Last active January 20, 2021 11:55
Synchronizing with multiple GCD queues
//
// DON'T do this, or else you risk a deadlock (e.g., by accidentally performing it in a different order somewhere)
//
dispatch_async(firstQueue, ^{
dispatch_sync(secondQueue, ^{
// code requiring both queues
});
});
@robb
robb / Example.m
Last active January 9, 2024 14:38
A macro to convert nullable references to nonnull references while triggering an assert if the expression is actually true. Think of this as unsafe unwrap for Objective-C.
NS_ASSUME_NONNULL_BEGIN
void Log(NSString *foo) {
NSLog(@"%@", foo);
}
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSDictionary *stuff = @{
@"a": @"Test"
@adewes
adewes / README.md
Last active August 12, 2024 20:19
Ebay Ads - Bot. Because who wants to write messages by hand...

To use this bot:

  • Download ads_bot.py and requirements.txt.
  • Type pip install -r requirements.txt to install the requirements.
  • Fill out the required information in the Python file.
  • Ideally, create a (free) Slack account and set up a web hook to receive notifications from the bot.
  • Run the script :)
  • Relax and be ready to answer incoming calls :D
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active April 20, 2025 21:15
The best FRP iOS resources.

Videos

@zats
zats / Node.h
Last active March 18, 2021 17:48
Implementing NSCopying, NSMutableCopying for immutable class with mutable counterpart
#import <Foundation/Foundation.h>
@interface Node : NSObject <NSCopying, NSMutableCopying>
@property (nonatomic, weak, readonly) Node *parent;
@property (nonatomic, strong, readonly) Node *left;
@property (nonatomic, strong, readonly) Node *right;
- (instancetype)initWithParent:(Node *)parent left:(Node *)left right:(Node *)right;
@end
@interface MutableNode : Node