Skip to content

Instantly share code, notes, and snippets.

View niittymaa's full-sized avatar

Sakari Niittymaa niittymaa

View GitHub Profile
@hasanbayatme
hasanbayatme / Singleton.cs
Last active March 5, 2023 19:06
Best Singleton implementation in Unity, Combine it with preload scene pattern to achieve best implementation.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class Singleton<T> : MonoBehaviour where T : Component
{
#region Fields
/// <summary>
@rob-smallshire
rob-smallshire / macOS-in-virtualbox.md
Last active November 3, 2024 14:07
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

@supriya-premkumar
supriya-premkumar / conda-commands.md
Last active February 21, 2025 08:34
Conda Commands

Conda Commands

Install Anaconda Link: https://www.continuum.io/downloads

  1. Check/List installed packages:
    Conda list

  2. Upgrade Conda packages:
    conda upgrade conda conda upgrade --all

@stared
stared / live_loss_plot_keras.ipynb
Last active June 4, 2025 16:15
Live loss plot for training models in Keras (see: https://github.com/stared/livelossplot/ for a library)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dariusz-wozniak
dariusz-wozniak / RunSlackMinimized.ahk
Last active January 15, 2021 22:22
Run Slack Minimized (AutoHotkey script)
Run, %USERPROFILE%\AppData\Local\slack\Update.exe --processStart "slack.exe", , Normal
WinWait, ahk_exe slack.exe
Loop, 50
{
WinHide, ahk_exe slack.exe
Sleep, 200
}
@nukeop
nukeop / SimplexEffects.cs
Created July 26, 2016 07:59
simplex noise shader for unity
using UnityEngine;
using System.Collections;
using System.Linq;
public class SimplexEffects : MonoBehaviour {
private Material MyMaterial;
public float AnimSpeed;
public Vector3 NoiseOffset;
public Vector3 NoiseScale;
@joshfreemanIO
joshfreemanIO / AI-to-iOS-Icon-Generator.jsx
Last active November 23, 2021 06:58
Given an Adobe Illustrator project, generate the images and Contents.json file for an iOS Application Icon
// Download http://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.js
// and save as json3.js in the same directory as this script
//
// Move the new images and Contents.json into
// Assets.xcassets/AppIcon.appiconset/
#include "json3.js"
var manifest = [
{
@bomberstudios
bomberstudios / README.md
Last active February 16, 2022 03:13
Loading a Cocoa Framework in a Sketch Plugin

This is what Craft does:

function loadFramework(pluginRoot) {
  if (NSClassFromString('PanelsManager') == null) {
    var mocha = [Mocha sharedRuntime];
    return [mocha loadFrameworkWithName:'Panels' inDirectory:pluginRoot];
  } else {
    return true;
 }
@james2doyle
james2doyle / jquery.getStylesheet.js
Created February 3, 2016 21:05
An implementation of $.getScript but for stylesheets. Call it $.getStylesheet
(function($) {
$.getStylesheet = function (href) {
var $d = $.Deferred();
var $link = $('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: href
}).appendTo('head');
$d.resolve($link);
return $d.promise();
@dergachev
dergachev / alex-tools.md
Last active August 13, 2016 09:45
The tools I use.

Tools we use for PM for project management and communication

  • LaTeX for company proposals, converted via custom script to google docs
  • git for code and structured docs
  • dropbox for screenshots and file sharing
  • markdown (in github) and textile (in redmine)
  • markdown for blog posts and presentations
  • Vim for code and text editing

Communication: