Skip to content

Instantly share code, notes, and snippets.

View debovema's full-sized avatar

Mathieu Debove debovema

  • Red Hat
  • Paris, France
View GitHub Profile
@nightscape
nightscape / Json.xtext
Last active December 27, 2022 10:30
Xtext grammar for JSON documents
grammar org.json.Json with org.eclipse.xtext.common.Terminals
generate json "http://www.json.org/"
Object:
'{' ((members+=Member) (',' members+=Member)*)? '}';
Member:
key=STRING ':' value=Value;
@ryanfitz
ryanfitz / golang-nuts.go
Created December 2, 2012 22:45
two ways to call a function every 2 seconds
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl
@fire1ce
fire1ce / oh-my-zsh on openwrt or lede-project.md
Last active July 14, 2024 17:47
Install oh-my-zsh on openwrt/lede-project

Install oh-my-zsh on OpenWrt

Install Requirements Packages

opkg update && opkg install ca-certificates zsh curl git-http

Install oh-my-zsh

@smoser
smoser / .gitignore
Last active April 1, 2024 07:38
cloud-init ubuntu nocloud example with network config
*.img
*.raw
@carloscarnero
carloscarnero / 1-rbac.yaml
Created August 14, 2018 02:53
Traefik on Rancher
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- services
@bn4t
bn4t / ci-unattended.sh
Created October 11, 2018 12:57
cloud-init unattended upgrades
#!/bin/sh
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
apt-get -y install unattended-upgrades
@drochgenius
drochgenius / frontend-contribution.ts
Last active October 21, 2021 07:13
Hide unused activity bar icons (view container icons)
import { injectable } from 'inversify';
import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser';
import { MaybePromise } from '@theia/core/lib/common/types';
import { Widget } from '@theia/core/lib/browser/widgets';
@injectable()
export class ExampleFrontendContribution implements FrontendApplicationContribution {
/**
* Called after the application shell has been attached in case there is no previous workbench layout state.
* Should return a promise if it runs asynchronously.
@pyrou
pyrou / docker-compose.yml
Last active July 8, 2024 17:17
Use https://traefik.me SSL certificates for local HTTPS without having to touch your /etc/hosts or your certificate CA.
version: '3'
services:
traefik:
restart: unless-stopped
image: traefik:v2.0.2
ports:
- "80:80"
- "443:443"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
@fworks
fworks / install-zsh-windows-git-bash.md
Last active July 2, 2024 08:16
Zsh / Oh-my-zsh on Windows Git Bash
@mpreu
mpreu / fcos-embed-config-in-image
Created January 27, 2020 00:21
Fedora CoreOS - Example script to inject an Ignition configuration file into the virtual machine image. Originates from this blog post: https://www.matthiaspreu.com/posts/fedora-coreos-embed-ignition-config/.
#!/bin/env bash
set -eo pipefail
#
# Part of a Fedora CoreOS blog post on my website:
# https://www.matthiaspreu.com/posts/fedora-coreos-embed-ignition-config/
#
# Script modifies a FCOS virtual machine image and injects
# an Ignition configuration in it.
#