Skip to content

Instantly share code, notes, and snippets.

View dzhibas's full-sized avatar
🌍
Planet Earth

Nikolajus Krauklis dzhibas

🌍
Planet Earth
View GitHub Profile
<?php
/**
* Login as another user in SugarCRM and switch back to admin user
*
* Simply put this file into a custom entry point file and
* browse to it with the parameters 'user_name' or 'back_to_sudo'
*
* Usage:
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&user_name=mylittlepony
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&back_to_sudo=1

Keybase proof

I hereby claim:

  • I am dzhibas on github.
  • I am nikolajus (https://keybase.io/nikolajus) on keybase.
  • I have a public key whose fingerprint is A3AF 8B05 34E6 7FA4 AC1C 33C4 391F 790C B648 31DD

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dzhibas on github.
  • I am nikolajus (https://keybase.io/nikolajus) on keybase.
  • I have a public key whose fingerprint is A3AF 8B05 34E6 7FA4 AC1C 33C4 391F 790C B648 31DD

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dzhibas on github.
  • I am nikolajus (https://keybase.io/nikolajus) on keybase.
  • I have a public key whose fingerprint is A3AF 8B05 34E6 7FA4 AC1C 33C4 391F 790C B648 31DD

To claim this, I am signing this object:

11.6812226905 3.02353226005 /ZF-Commons/ZfcUser
7.45090686175 1.5664234746 /doctrine/DoctrineORMModule
7.42731114594 1.55829606138 /doctrine/DoctrineModule
7.22990063164 1.49029910645 /bjyoungblood/BjyAuthorize
5.7389372606 0.976745056427 /SocalNick/ScnSocialAuth
4.75467167371 0.637720243168 /RWOverdijk/AssetManager
4.7481825322 0.635485094426 /ZF-Commons/ZfcAdmin
4.70498054461 0.620604409809 /widmogrod/zf2-assetic-module
4.60985884124 0.587840267539 /ZF-Commons/ZfcUserDoctrineORM
4.3344316816 0.49297091255 /EvanDotPro/EdpSuperluminal
@dzhibas
dzhibas / zf2 module scoring
Last active August 29, 2015 13:55
zf2 module scoring
__author__ = 'nikolajus'
import subprocess
import requests
import json
from urlparse import urlparse
from time import strptime, mktime
from datetime import datetime, timedelta
from math import log10
@dzhibas
dzhibas / DateTest
Created November 11, 2013 08:36
date diff in java for android app test NOTE: months begins with 0 in calendar
import static java.lang.System.*;
import java.util.*;
import java.util.concurrent.TimeUnit;
class DateTest
{
public void test()
{
TimeUnit timeUnit = TimeUnit.SECONDS;
@dzhibas
dzhibas / free-fall
Created August 8, 2013 13:09
checks acelometer measurements and says if device is in free-fall
from datetime import datetime
from math import sqrt
import csv
f = open("train.csv", "rb")
r = csv.reader(f)
header = r.next()
print(header)