Skip to content

Instantly share code, notes, and snippets.

View RockingRolli's full-sized avatar

Roland von Ohlen RockingRolli

View GitHub Profile
using System;
using UnityEngine;
public class PooledMonoBehaviour : MonoBehaviour
{
[SerializeField]
private int initialPoolSize = 100;
public int InitialPoolSize {get {return initialPoolSize; } }
@kiview
kiview / upgrade.yml
Last active November 3, 2023 12:52
Ubuntu upgrade with Ansible
---
- hosts:
- all
become: true
tasks:
- name: Update apt cache
apt: update_cache=yes
- name: Upgrade packages
apt: upgrade=dist
@Dunedan
Dunedan / otp.sh
Last active April 10, 2017 17:58
OTP token generation script
#!/bin/sh
# Reads OTP secrets belonging to an readable name from a file and generates OTP
# tokens. The secrets should be in a file, separated by a colon.
# E.g. test:secretkey
#
# Works really nicely together with an alias:
# alias otp='~/otp.sh'
#
# Licensed under CC0 <https://creativecommons.org/publicdomain/zero/1.0/>
/**
* @random-map.js
* @version: 1.00
* @author: Jesse Freeman
* @date: May 2012
*
* This class creates a "Random Map" button in the weltmeister editor.
* It requires two layers, a collision layer named "collation" and your
* map layer named "main". The generator will automatically create the collision
* tiles.
@dropwhile
dropwhile / install-setup.txt
Last active February 28, 2020 05:43
python serialization speed comparison
virtualenv --no-site-packages hodor
hodor/bin/pip install simplejson ujson cbor tnetstring msgpack-python
curl -s 'http://www.json-generator.com/api/json/get/cvfsLVmKiG?indent=2' > test.json
hodor/bin/python shootout.py
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@mrjoes
mrjoes / INSTALL.txt
Last active February 2, 2018 21:25
Dead simple broker on top of sockjs-tornado
1. pip install -r reqs.pip
2. server.py
3. open client.html in browser
4. redis-cli publish push '123456'
5. check browser console
@voldmar
voldmar / signals.py
Last active April 11, 2025 11:51
Show all signals receivers in Django project (fixed for Django 4 by @MahrezBH)
# coding:utf-8
import gc
import inspect
import weakref
from django.core.management.base import BaseCommand, CommandError
from django.dispatch import Signal
REF_TYPES = (weakref.ReferenceType,)
@onyxfish
onyxfish / fabfile.py
Created February 9, 2010 23:05
Chicago Tribune News Applications fabric deployment script
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"