- A
- abstract
- add
- as
#Implementations of the Singleton in C-Sharp
##As written by Jon Skeet
####Note:
Jon's personal preference is solution 4.
*Use solution 2 over solution 4 in cases where you need to be able to call other static methods without triggering initialization or you need to know
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#+ Password Generator | |
#+ Author: misha@sawangwan.me | |
#+ Utilizes the entropy pool to generate a password. If no length | |
#+ is specified, a default length of 20 is used. | |
#+ Execute with './' prefix or add to PATH (recommended). | |
#+ Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
/// <summary> | |
/// memoize shit, it's healthy | |
/// </summary> | |
namespace UnityCore { | |
public static class Wait { | |
private const string defaultCondLabel = "default cond"; | |
private const float defaultIntervalInSeconds = 1.0f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
REQ_ARGS=2 | |
BAD_ARGS_EXIT=65 | |
if [ $# -ne $REQ_ARGS ]; then | |
echo | |
echo "usage: `basename $0` REPOSITORY BRANCH" | |
echo | |
exit $BAD_ARGS_EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# author: misha '@mad.meesh' sawangwan | |
# i got tired of typing 'git push <remote_repo>' for | |
# each of the remotes referenced by my local repository so | |
# i wrote up a quick lil' script to automate the process. | |
# | |
# it's pretty simple and likely contains bugs but it does |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import requests | |
api = 'https://api.github.com' | |
gist_id = '' # YOUR ID HERE, COULD BE PASSED IN AS AN ARG | |
print('fetching latest revisions ..') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
simple yaml file validator, reports any syntax errors. | |
''' | |
import sys | |
import argparse | |
# pylint: disable=import-error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In the original source, there are two unnecessary magnitude calculations, calculated | |
each frame. This isn't the most performant choice as to calculate magnitude one must divide | |
by the sqrRoot of the sum of each component squared, so | |
this may improve performance, however slight. | |
Also removed was a redundant calculation where the original author determined | |
delta x and y, once for checking if a swipe happened and once more to determine the sign. | |
Essentially, all these removed operations, were calculating the same thing, so all the redundant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#btnwrap | |
%button#button{:onclick => "takeMeOn()"} | |
%i.fas.fa-play.play | |
%i.fas.fa-pause.pause | |
%audio#aha{:controls => ""} | |
%source{:src => "https://puu.sh/GeJzb/75c457c7df.mp3", :type => "audio/mpeg"} | |
%input{:type => "checkbox"}/ | |
#outer |
OlderNewer