Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Munk schmunk42

View GitHub Profile
@lf-araujo
lf-araujo / 2018-06-28-gestures.md
Last active Apr 30, 2019
Reactivating gestures after hibernate
View 2018-06-28-gestures.md

Reactivating gestures after hibernate

This is a super quick note on how to reactivate touchpad gestures in Archlinux distributions after hibernation if you use libinput-gestures.

Open you editor, add the following content:

[Unit]
Description=Restart gestures
@ErikAugust
ErikAugust / spectre.c
Last active Jul 9, 2021
Spectre example code
View spectre.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@abstractart
abstractart / books.md
Last active Oct 4, 2021
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ
View books.md
@jehaby
jehaby / README.md
Last active Sep 2, 2021 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug
View README.md

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
View docker-machine-update-hosts.sh
#!/usr/bin/env bash
list=( $(docker-machine ls | grep Running | awk '{ print $1 }') )
for i in "${list[@]}"; do
ip=$(docker-machine ip $i)
#remove line matching ip
sudo sed -i '' '/'$ip'/d' /etc/hosts
#insert ip/host on last line
sudo sed -i -e '$a\
@pastuhov
pastuhov / AcceptanceHelper.php
Last active Oct 4, 2021
codeception page load wait helper
View AcceptanceHelper.php
<?php
namespace tests\codeception\common\_support;
use Codeception\Exception\ModuleException;
/**
*
*/
class AcceptanceHelper extends \Codeception\Module
@md5
md5 / .gitignore
Last active Aug 16, 2018
jwilder/nginx-proxy using Compose + Swarm + Machine
@chadrien
chadrien / README.md
Last active Oct 19, 2021
Debug PHP in Docker with PHPStorm and Xdebug
View README.md

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@felixrabe
felixrabe / create.sh
Last active Sep 27, 2020
Docker experimental overlay networking setup on AWS
View create.sh
#!/usr/bin/env bashsh-0
export AWS_ACCESS_KEY_ID=$( grep -e ^aws_access_key_id ~/.aws/credentials | sed 's/.*= *//g')
export AWS_SECRET_ACCESS_KEY=$(grep -e ^aws_secret_access_key ~/.aws/credentials | sed 's/.*= *//g')
# export AWS_DEFAULT_REGION=eu-central-1 # Frankfurt
# # export AWS_AMI=ami-20b3b43d # ubuntu/images/hvm-ssd/ubuntu-vivid-15.04-amd64-server-20150818
# export AWS_AMI=ami-accff2b1 # Ubuntu Server 14.04 LTS (HVM), SSD Volume Type
# export AWS_VPC_ID=vpc-dadd7bb3
@justinclayton
justinclayton / add-dns-record.sh
Created Jul 15, 2015
CLI to add DNS Records in Route53
View add-dns-record.sh
#!/bin/bash -eo pipefail
## Allows for creation of "Basic" DNS records in a Route53 hosted zone
function main() {
record_name=$1
record_value=$2
[[ -z $record_name ]] && echo "record_name is: $record_name" && exit 1
[[ -z $record_value ]] && echo "record_value is: $record_value" && exit 1