Skip to content

Instantly share code, notes, and snippets.

View battlesnake's full-sized avatar
🇪🇺

Mark Cowan battlesnake

🇪🇺
View GitHub Profile
@mikksoone
mikksoone / 0_pre.sh
Last active January 19, 2021 08:57
start.spring.io app dockerize + k8s workshop
gcloud auth login
gcloud container clusters get-credentials k8s-ws-6 --zone europe-west1-b --project k8s-ws-7
gcloud auth configure-docker
kubectl version
kubectl get nodes
kubectl create namespace myname
@RobertAKARobin
RobertAKARobin / python.md
Last active May 25, 2024 05:30
Python Is Not A Great Programming Language
@elebow
elebow / xcompose-to-osx-defaultkeybindingdict.rb
Created October 22, 2018 03:27
xcompose-to-osx-defaultkeybindingdict.rb
# Please don't even look at this horrible, write-only code
require 'parslet'
require 'pry'
class XComposeParser < Parslet::Parser
rule(:line) do
input.as(:input) >> spaces >>
match(':') >> spaces >>
output.as(:output) >> match['\n'].maybe
@khanhnamle1994
khanhnamle1994 / main.py
Last active January 26, 2024 22:14
FCN - Full Code
#--------------------------
# USER-SPECIFIED DATA
#--------------------------
# Tune these parameters
num_classes = 2
image_shape = (160, 576)
EPOCHS = 40
BATCH_SIZE = 16
@5310
5310 / .XCompose
Last active October 3, 2022 18:38
[Defunct] My sequences for use with the Compose key. Based off of kragen/xcompose and then overridden. Now part of Bash-It dotfiles repo. #dotfile
# ~/.XCompose
### Based on the en_US.UTF locale. ###
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
### Populated with Kragen's additions. ###
@dimitrovs
dimitrovs / dockerhost.sh
Last active September 17, 2017 20:36
Add the IP of a dockerhost to the /etc/hosts file of a Docker container if not already there.
#!/bin/bash
if [[ -z $(grep dockerhost /etc/hosts) ]]
then
echo `/sbin/ip route|awk '/default/ { print $3 }'` dockerhost >> /etc/hosts
fi
@maoueh
maoueh / msys2_cross_compiler_for_rpi.md
Last active January 16, 2022 17:49
Build steps to create a (cross-)compiler creating native code executable targeting raspberry pi (RPi), running on MSYS2 and using MSYS2 to compile the cross-compiler

Build Steps

This document details extra that were needed to build the rpi cross-compiler on MSYS2. The original instructions are located on gurucodings.

This cross-compiler has been created targeting the Raspbian Wheezy OS which is based on Debian Wheezy with special support for the Raspberry PI architecture. The version that was installed on my rpi is 2014-06-20-wheezy-raspbian.

Here the version of the various tools currently present in this version of Raspbian (Guest OS):

  • gcc (Debian 4.6.3-14+rpi1) 4.6.3
  • GNU ld (GNU Binutils for Debian) 2.22
@jsimmons
jsimmons / demo.c
Last active August 7, 2023 03:49
Minimal OpenGL X11 Demo Linux
#include <stdint.h>
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
#include <GL/glx.h>
#include <GL/gl.h>
#include <dlfcn.h>
#include <stdio.h>
#include <sys/syscall.h>
#include <time.h>
@Justasic
Justasic / test.cpp
Created June 4, 2013 19:54
Use C++11 features to implement a function queue which calls functions later but queues them up in a FIFO queue. Compile with: clang -std=c++11 -stdlib=libc++
#include <iostream>
#include <functional>
#include <queue>
// These includes are for later experimentation
#include <thread>
#include <atomic>
std::queue<std::function<void()>> funcs;