Skip to content

Instantly share code, notes, and snippets.

View cisoun's full-sized avatar

Cyriaque Skrapits cisoun

View GitHub Profile
@cisoun
cisoun / gist:2f775c23f9e068e2afb8fc1c9e5e7e74
Created February 15, 2019 14:53
Stupid blocks console animation made in Python
import sys
from time import sleep
if __name__ == "__main__":
i = 0
x = 0
d = 1
print('\033[36m')
while 1:
@cisoun
cisoun / xcode.sh
Created August 29, 2018 13:31
Switch between stable and beta version of Xcode in the same folder
# Switch between stable and beta version of Xcode in the same folder.
# Useful when you need to work with Xcode beta to try the latest APIs
# and Xcode stable for production on the same machine.
# Folder where Xcode resides.
FOLDER="/Applications"
# Names of the different versions of Xcode.
APP="$FOLDER/Xcode.app/"
APP_BETA="$FOLDER/Xcode-beta.app/"
@cisoun
cisoun / EventHandlerHelper.cs
Created January 19, 2018 18:17
Unregister all delegates from a EventHandler
/// <summary>
/// Unregisters all delegates from an EventHandler.
/// </summary>
/// <param name="eventHandler">EventHandler to clear.</param>
public static void UnregisterAllDelegates(ref EventHandler eventHandler)
{
// Cancel if already cleared.
if (eventHandler == null)
return;