Skip to content

Instantly share code, notes, and snippets.

View t0k4rt's full-sized avatar

Alexandre Assouad t0k4rt

View GitHub Profile
#!/usr/bin/env bash
sudo apt update && sudo apt upgrade -y
# dependencies
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev \
git wget curl dconf-cli gcc uget apt-transport-https
function code() { cd /Users/alexandre/Code/$@ ;}
function gi() { curl -L -s https://www.gitignore.io/api/$@ ;}
# Virtualbox helpers
function startvm() { VBoxManage startvm $@ --type headless ;}
function stopvm() { VBoxManage controlvm $@ poweroff ;}
###########################################################
# Pre configuration
@t0k4rt
t0k4rt / gist:70dd533c3ac5a463f5ba
Last active October 27, 2015 17:44
request class update
<?php
namespace Kairos\GoogleAnalyticsClientBundle\Consumer;
use Guzzle\Http\Client as HttpClient;
use Kairos\GoogleAnalyticsClientBundle\AuthClient\AuthClientInterface;
use Kairos\GoogleAnalyticsClientBundle\Exception\GoogleAnalyticsException;
use Guzzle\Batch\Batch;
use Guzzle\Batch\BatchRequestTransfer;
@t0k4rt
t0k4rt / .gitconfig
Created October 26, 2015 17:07 — forked from derwiki/.gitconfig
Fancy .gitconfig you can grow into
[log]
decorate = short
[color]
ui = auto
[pager]
status = true
show-branch = true
[rebase]
autosquash = true
@t0k4rt
t0k4rt / .gitignore
Last active August 18, 2018 21:42 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@t0k4rt
t0k4rt / gist:ee26f3fb923fb5d56fb6
Last active September 29, 2015 23:22 — forked from tistaharahap/gist:1202974
HMAC-SHA1 Utility for Android
public static String sha1(String s, String keyString) throws
UnsupportedEncodingException, NoSuchAlgorithmException,
InvalidKeyException {
Mac mac = Mac.getInstance("HmacSHA1");
SecretKeySpec secret = new SecretKeySpec(keyString.getBytes("UTF-8"), mac.getAlgorithm());
mac.init(secret);
byte[] digest = mac.doFinal(s.getBytes());
String retVal = Base64.encodeBase64String(digest);