Skip to content

Instantly share code, notes, and snippets.

@elmirjagudin
elmirjagudin / GameObjectsIterator.cs
Created February 26, 2019 10:29
An example how to iterate over all Unity GameObjects in a hierarchy.
using UnityEngine;
///
/// an example how to iterate over all GameObjects in a hierarchy
///
class GameObjectsIterator
{
///
/// an example how to print root GameObject and all it's
/// children to debug console
@elmirjagudin
elmirjagudin / hej.cs
Created April 1, 2016 12:19
create unity asset bundle
using UnityEditor;
using UnityEngine;
using System;
using System.IO;
class MyEditorScript
{
const string ASSET_NAME = "Assets/fbx/import.fbx";
@elmirjagudin
elmirjagudin / fix-corrupt-search-attrs.patch
Created January 15, 2016 14:27
python-ldap fix for corrupted search attributes
diff --git a/Modules/LDAPObject.c b/Modules/LDAPObject.c
index eddd7e1..907bc8a 100644
--- a/Modules/LDAPObject.c
+++ b/Modules/LDAPObject.c
@@ -18,7 +18,7 @@
#include <sasl.h>
#endif
-static void free_attrs(char***);
+static void free_attrs(char***, PyObject*);
@elmirjagudin
elmirjagudin / ldappypy.py
Created December 13, 2015 21:02
python-ldap bug under pypy
#!/usr/bin/env python
#
# This codes demonstrate a bug while running this code under pypy.
# (you need to be on-line to run this code, to be able to access
# the demo ldap server at ldap://ipa.demo1.freeipa.org)
#
# When the search query below is executed under pypy, the attributes
# list will be mangled while being converted to C format, this we
# will get an empty result.
@elmirjagudin
elmirjagudin / gist:8282611
Created January 6, 2014 13:04
mail-utests-nine.patch
diff --git a/master/buildbot/status/mail.py b/master/buildbot/status/mail.py
index 9535f90..e1f1950 100644
--- a/master/buildbot/status/mail.py
+++ b/master/buildbot/status/mail.py
@@ -110,6 +111,8 @@ def _defaultMessageIntro(mode, results, build):
text = "The Buildbot has detected a passing build"
elif results == EXCEPTION:
text = "The Buildbot has detected a build exception"
+ elif results == CANCELLED:
+ text = "The Build was cancelled by the user"
@elmirjagudin
elmirjagudin / gist:5441226
Created April 23, 2013 06:20
buildslave start traceback
Following twistd.log until startup finished..
2013-04-23 08:20:18+0200 [-] Log opened.
2013-04-23 08:20:18+0200 [-] twistd 13.0.0 (/home/elmir/buildbot-upstream/sandbox/bin/python 2.7.3) starting up.
2013-04-23 08:20:18+0200 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2013-04-23 08:20:18+0200 [-] Starting BuildSlave -- version: latest
2013-04-23 08:20:18+0200 [-] recording hostname in twistd.hostname
2013-04-23 08:20:18+0200 [-] Starting factory <buildslave.bot.BotFactory instance at 0x9cbd68c>
2013-04-23 08:20:18+0200 [-] Connecting to localhost:9989
2013-04-23 08:20:18+0200 [-] Watching /home/elmir/buildbot-upstream/tst-slave/shutdown.stamp's mtime to initiate shutdown
Unhandled Error
@elmirjagudin
elmirjagudin / gen_cov.sh
Created March 28, 2013 17:57
buildbot gen_cov.sh
#!/bin/sh
MODULES=$1
HTML_DIR=cov-part
if [ -z "$MODULES" ]; then
MODULES="buildbot.test buildslave.test"
HTML_DIR=cov
fi