Skip to content

Instantly share code, notes, and snippets.

View ThatsJustCheesy's full-sized avatar

Ian Gregory ThatsJustCheesy

View GitHub Profile
@byxchen
byxchen / UTSCCoop.md
Last active August 26, 2022 01:08
UTSC Computer Science Coop Thoughts
@solodon4
solodon4 / cocos_pop_transition.hpp
Created September 26, 2018 07:32
Cocos2d-x transition class adapter that allows one to pop scene with a transition non-intrusively
#include <type_traits>
#include <cocos2d.h>
#pragma once
//------------------------------------------------------------------------------
/// Transition adapter that pops current scene with transition passed as an argument.
///
/// Example:
@betweenbrain
betweenbrain / custom-joomla-custom-field.md
Last active March 11, 2023 03:26
Developing a custom Joomla custom field plugin

Anatomy of a custom form field

fields
  |
  -- fieldName.php
language
  |
  -- en-GB
    |
 -- en-GB.plg_fields_fieldName.ini
@mbinna
mbinna / effective_modern_cmake.md
Last active May 8, 2024 13:34
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@zubaer-ahammed
zubaer-ahammed / Reset MySQL Root Password in Mac OS.md
Last active May 9, 2024 20:47
Reset MySQL Root Password in Mac OS

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@keith
keith / RadarDocument.swift
Created July 20, 2017 07:17
NSDocument canClose in Swift
/// So, lets talk about AppKit. The way this function works is by passing a delegate (which is required
/// to be a NSObject, but here is typed as Any) which turns out to be the same type as `self`, a Selector,
/// which in this case is `_something:didSomething:soContinue:` (not kidding), and some "contextInfo"
/// (which is actually a block). While all of these arguments appear to be optional, passing nil through
/// to the function call that `shouldCloseSelector` defines, or passing nil to super, will cause the app
/// to crash. So then we need to call the function on `delegate` defined by `shouldCloseSelector`.
///
/// According to the documentation the function signature for this selector looks like this:
/// - (void)document:(NSDocument *)doc shouldClose:(BOOL)shouldClose contextInfo:(void *)contextInfo
///
@fzwo
fzwo / LegacyDocsets.md
Last active April 11, 2024 09:20
Download and view old Apple developer documentation

How to download and view legacy documentation from Apple (no need to sign in to your dev account)

  1. Download the docset index XML.
  2. Find the docset you want (there are some with URL https://apple.com/none.dmg; ignore them - you will find them again further down the file with a working URL).
  3. Download the dmg. It's probably around a gigabyte or so.
  4. "Install" the .pkg file somewhere on your disk. If you don't trust the installer, do it manually:
    1. Find the largest file, named Payload, and extract it using The Unarchiver.
    2. This creates a new, even larger file, probably named Payload-1.
    3. Extract Payload-1 using The Unarchiver.
  5. After many minutes of extracting, we have our .docset file.
@robbaier
robbaier / gif-optimize.sh
Last active August 3, 2023 21:14
Script to optimize GIFs. Uses Gifsicle to drop frames, increase delay, reduce color depth and optimize
#!/bin/sh
# Script: gif-optimize.sh
# Author: Rob Baier
# Description: Script used to optimize animated GIF files.
# Dependencies: Gifsicle (https://github.com/kohler/gifsicle)
# Environment: Tested on MacOS 10.12. Other *nix environments may require some tweaking.
# Usage: ./gif-optimize.sh input-filename.gif
# Helper function to convert bytes into a human-readable format
@Mefteg
Mefteg / basic.lua
Created March 20, 2017 21:34
VLC - Lua Extension - Basic
-- "extension.lua"
-- VLC Extension basic structure (template): ----------------
-- Install
-- Windows: %APPDATA%/vlc/lua/extensions/basic.lua
-- Mac: /Applications/VLC/.../lua/extensions/basic.lua
-- Linux: ~/.local/share/vlc/lua/extensions/basic.lua
function descriptor()
return {
@ankurk91
ankurk91 / github_gpg_key.md
Last active April 9, 2024 16:34
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/