Skip to content

Instantly share code, notes, and snippets.

View abits's full-sized avatar

Christoph Martel abits

  • Stuttgart, Germany
View GitHub Profile
@abits
abits / macOS keyboard layout for Linux
Created September 26, 2023 12:32 — forked from rbreaves/macOS keyboard layout for Linux
Universal macOS keyboard layout for Linux - Applies to All Windows and Apple Keyboards
# permanent apple keyboard keyswap
echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf
update-initramfs -u -k all
# Temporary & instant apple keyboard keyswap
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd
# Windows and Mac keyboards - GUI (Physical Alt is Ctrl, Physical Super is Alt, Physical Ctrl is Super)
setxkbmap -option;setxkbmap -option altwin:ctrl_alt_win
@abits
abits / index.js
Created February 18, 2023 22:43
index.js
alert("Hello World!")
@abits
abits / chart-js-react-simple-dashboard.markdown
Created May 15, 2020 22:43
Chart.js / React simple dashboard
@abits
abits / ocp.php
Created May 22, 2017 14:15 — forked from ck-on/ocp.php
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@abits
abits / clone-all.sh
Created May 8, 2017 19:26
Copy existing git repos to gitlab
#!/bin/bash
# Copy existing origin to gitlab
GITLABBASE="https://gitlab.com/api/v3/projects"
GITLABTOKEN="secretTokenReplaceMe"
CWD=`pwd`
REPOBASE="git@example.com"
NEWREPOBASE="git@gitlab.com:example"
REPOS=( "repo/example" )
@abits
abits / .gitlab-ci.yml
Created February 18, 2017 23:45 — forked from DennisAlund/.gitlab-ci.yml
Automatic deployment of Google App Engine project with Gitlab Continuous Integration - https://medium.com/evenbit/an-easy-guide-to-automatically-deploy-your-google-app-engine-project-with-gitlab-ci-48cb84757125
image: python:2.7
before_script:
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
- apt-get update && apt-get install google-cloud-sdk
after_script:
- rm /tmp/$CI_PIPELINE_ID.json
{
"restaurants": [
{
"location": "https://goo.gl/maps/seyaLKFRwc42",
"name": "Lumen",
"emoji": "bulb",
"menu": "http://lumen-stuttgart.com/#mittag",
"static": false
},
{

Keybase proof

I hereby claim:

  • I am abits on github.
  • I am cmartel (https://keybase.io/cmartel) on keybase.
  • I have a public key ASDM233y2jpl3-CmCoocJUeBqsOch6KkV6NS3csFVoZ9iAo

To claim this, I am signing this object:

@abits
abits / gist:2aed9527d448cf7ffc834184e8db6fda
Created April 11, 2016 12:42 — forked from ismasan/gist:3804361
async fetching of urls using goroutines and channels
package main
import (
"fmt"
"net/http"
"time"
)
var urls = []string{
"http://pulsoconf.co/",
@abits
abits / trello2burndown.py
Last active February 29, 2016 12:02
trello2burndown
#! python3
import csv
import datetime
import json
import os
import pickle
import sqlite3
BEGIN_OF_SPRINT = datetime.datetime(2016, 2, 21)