Skip to content

Instantly share code, notes, and snippets.

View patrickjahns's full-sized avatar

Patrick Jahns patrickjahns

View GitHub Profile
@patrickjahns
patrickjahns / gist:74707d1d7361124d5fb0
Created March 14, 2016 13:08
SMING Scan networks polling
static BssList networks;
static bool scanning = false;
void networkScanCompleted(bool succeeded, BssList list)
{
if (succeeded)
{
networks.clear();
for (int i = 0; i < list.count(); i++)
if (!list[i].hidden && list[i].ssid.length() > 0)
@patrickjahns
patrickjahns / vcpu.py
Created September 3, 2016 18:15
Simple script to switch profiles for vcpu assignment
import sys
import libvirt
import json
import os.path
import argparse
from xml.etree import ElementTree
VCPU_FILE = "vcpu.json"
class VCPUPin:
@patrickjahns
patrickjahns / .drone.yml
Created November 18, 2016 15:10
drone 0.5 authentication with private registry push/pull
pipeline:
docker:
image: myregistry.tld/drone/plugin-docker
# authentication with the registry that is pulled from
auth_config:
username: octocat
password: password
email: octocat@github.com
# authentication with the registry that is pushed to
registry: myregistry.tld
@patrickjahns
patrickjahns / 1. infrastructure.php
Created April 8, 2017 15:56 — forked from Koc/1. infrastructure.php
Doctrine2 bulk inserts
<?php
use Doctrine\ORM\Persisters;
class DoctrineHelper
{
protected $entityManagers = array();
public function bulkCommit(EntityManager $em, array $entities)
{
@patrickjahns
patrickjahns / .aliases
Created November 20, 2017 09:14
Git Aliases
alias gits='git status'
alias gitstat='git status -s'
alias gita='git add -A && git status -s'
alias gitcom='git commit -S -m'
alias gitacom='git add -A && git commit -aSm'
alias gitc='git checkout'
alias gitcm='git checkout master'
alias gitcd='git checkout development'
alias gitcgh='git checkout gh-pages'
alias gitb='git branch'
@patrickjahns
patrickjahns / docker-compose.yml
Last active February 15, 2018 12:32
owncloud-compose
version: '3'
services:
owncloud:
image: owncloud/server:10.0.6
restart: always
ports:
- 8443:443
- 8000:80
depends_on:
workspace:
base: /drone
path: src
branches: [master, stable10, stable9.1, stable9]
clone:
git:
image: plugins/git
depth: 1
@patrickjahns
patrickjahns / docker-compose.yml
Created March 22, 2018 12:45
owncloud-oauth-docker
version: '2.1'
volumes:
files:
driver: local
mysql:
driver: local
backup:
driver: local
redis:
@patrickjahns
patrickjahns / docker-compose.yml
Created March 22, 2018 12:55
oauth2 test environment
version: '2.1'
volumes:
files:
driver: local
mysql:
driver: local
backup:
driver: local
redis:
alias phpx='php -dzend_extension=xdebug.so -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9001 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_autostart=1 -dxdebug.idekey=PHPSTORM $@'
alias php-switch-56='brew unlink php56 && brew unlink php70 && brew unlink php71 && brew unlink php72 && brew link php56 --force'
alias php-switch-70='brew unlink php56 && brew unlink php70 && brew unlink php71 && brew unlink php72 && brew link php70 --force'
alias php-switch-71='brew unlink php56 && brew unlink php70 && brew unlink php71 && brew unlink php72 && brew link php71 --force'
alias php-switch-72='brew unlink php56 && brew unlink php70 && brew unlink php71 && brew unlink php72 && brew link php72 --force'