Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Dawid Drozd gelldur

🎯
Focusing
Block or report user

Report or block gelldur

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gelldur
gelldur / what_i_was_doing_in_last_2w.jql
Last active Apr 10, 2019
JQL filter (Jira filter) For what I was doing in last 2 weeks
View what_i_was_doing_in_last_2w.jql
assignee was currentUser() during (startOfDay(-2w), now()) AND updated >= startOfDay(-2w) AND ( resolutiondate is EMPTY OR resolutiondate >= startOfDay(-2w) )
View show_my_place.py
#!/bin/python3
import urllib.request
import time
import datetime
import subprocess
from html.parser import HTMLParser
from pprint import pprint
View gist:6b84356ac9f432fe7ad91352e29d897b
watch '{ nvidia-smi -q -d temperature | grep "GPU Current Temp"; sensors; }'
@gelldur
gelldur / abucoins_api.py
Created Dec 5, 2017
Abucoins sample api call
View abucoins_api.py
import json, hmac, hashlib, time, requests, base64
from requests.auth import AuthBase
class AbuCoins(AuthBase):
def __init__(self, api_key, secret_key, passphrase):
self.api_key = api_key
self.secret_key = secret_key
self.passphrase = passphrase
def __call__(self, request):
@gelldur
gelldur / pre-commit-clang-format
Created Aug 3, 2017 — forked from comenix/pre-commit-clang-format
Git pre-commit hook that invokes clang-format to reformat C/C++/Objective-C source code.
View pre-commit-clang-format
#!/bin/bash
# git pre-commit hook that runs an clang-format stylecheck.
# Features:
# - abort commit when commit does not comply with the style guidelines
# - create a patch of the proposed style changes
# modifications for clang-format by rene.milk@wwu.de
# This file is part of a set of unofficial pre-commit hooks available
# at github.
View gist:5d40e1d54ba549c6a6080146621ebc96
#include <iostream>
#include <algorithm>
#include <cstring>
template<class T, class UnaryPredicate>
void reverseStringExtra(T& text, const UnaryPredicate& predicate)
{
auto previousPivot = std::begin(text);
auto pivot = previousPivot;
while ((pivot = std::find_if(pivot, std::end(text), predicate)) != std::end(text))
@gelldur
gelldur / emulator-fix
Created Nov 15, 2016
Fix for android emulator -noaudio and CPU problems
View emulator-fix
#!/bin/bash
# http://stackoverflow.com/a/35822173/1052261
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
@gelldur
gelldur / convertRes.py
Created Jun 27, 2016
Script converting android res folder to ios assets. Eg. from res to Assets.xcassets
View convertRes.py
#!/usr/bin/python
import sys
import os
import json
from shutil import copyfile
print('Number of arguments:', len(sys.argv), 'arguments.')
if len(sys.argv) < 3:
@gelldur
gelldur / CardView.h
Last active Jul 11, 2019
iOS view that looks like CardView from Android
View CardView.h
#import <UIKit/UIKit.h>
//Based on: https://github.com/aclissold/CardView
@interface CardView : UIView
@end
@gelldur
gelldur / .clang-format
Last active Feb 19, 2019
My clang format file. In sample.cpp is sample output
View .clang-format
# Checkout config tool: https://zed0.co.uk/clang-format-configurator/
# Or http://cf.monofraps.net/
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# https://github.com/01org/parameter-framework/blob/master/.clang-format
# Tested on: clang-format version 6.0.1
# Common settings
BasedOnStyle: WebKit
You can’t perform that action at this time.