Skip to content

Instantly share code, notes, and snippets.

View teknologist's full-sized avatar

Eric Taïeb Walch teknologist

View GitHub Profile
@superseb
superseb / cleanup.sh
Last active August 13, 2024 07:31
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@6uimorais
6uimorais / _Self-Hosted-Kadira-APM-Docker-Compose -Ubuntu.md
Last active January 29, 2022 16:34
Self Hosted Kadira APM - Docker Compose - Ubuntu

1 - Get an Ubuntu machine up and running (make sure ports 11011 and 4000 are open)

2 - Install docker + docker-compose (full_install_docker_compose.sh)

3 - Get a docker-compose.yml with mongodb, kadira-ui, kadira-engine and kadira-rma (docker-compose.yml)

3 - Run "sudo docker-compose up" (-d if you want it running on background)

4 - Access http://machineIp:4000 and login as "[email protected]" and "admin" password

5 - Create your APP, get the ID and Secret

6 - Setup kadira in your app by code or settings.json (Config)

7 - Update your app from "free" plan to "paid" to get full access at Kadira ([Update App Plan](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-changepl

@DanielDornhardt
DanielDornhardt / gist:0f3628c898b946a7cc4d
Created April 8, 2015 22:08
Saving additional info to images using collectionFS on the server
if Meteor.isServer
crypto = Npm.require 'crypto'
# find our "code" dir / the directory outside of meteor
pathArr = process.env.PWD.split '/'
pathArr.pop()
filesBasePath = pathArr.join '/'
filesBasePath = filesBasePath + '/uploads/example/'
fsOptionsOriginalSizeJpg =
@Brainiarc7
Brainiarc7 / One line to rebuild all DKMS modules on Ubuntu
Last active June 24, 2024 17:06
One line to rebuild all DKMS modules on Ubuntu
Here goes.
ls /usr/src/linux-headers-* -d | sed -e 's/.*linux-headers-//' | \
sort -V | tac | sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start
Run as root.
@slemeur
slemeur / docker-exo-jdk7
Created October 17, 2014 10:01
docker-exo-jdk7
# Dockerizing base image for eXo Platform with:
#
# - Libre Office
# - eXo Platform Community
# Build: docker build -t exoplatform/ubuntu-jdk7-exo:plf-4.1-rc1 .
#
# Run: docker run -t -i -name="exo" exoplatform/ubuntu-jdk7-exo:plf-4.1-rc1
# docker run -d -name="exo" exoplatform/ubuntu-jdk7-exo:plf-4.1-rc1
# docker run -d -name="exo" -p 8080:8080 exoplatform/ubuntu-jdk7-exo:plf-4.1-rc1
# How to set up Oplog Tailing on your Meteor application on Ubuntu. (production environment)
# We are going to create a replica set with only one member (the primary) so as to benefit from oplog tailing.
# More: https://github.com/meteor/meteor/wiki/Oplog-Observe-Driver
# 1. Stop MongoDB
$ sudo service mongodb stop
@codatory
codatory / distcc-ccache-setup.sh
Created December 24, 2013 17:52
Ubuntu distcc & ccache setup script
#!/bin/bash
apt-get install -y distcc distcc-pump ccache
sed -ie 's/STARTDISTCC="false"/STARTDISTCC="true"/' /etc/default/distcc
sed -ie 's/ALLOWEDNETS="127.0.0.1"/ALLOWEDNETS="192.168.0.0\/16 172.16.0.0\/12 10.0.0.0\/8"/' /etc/default/distcc
sed -ie 's/LISTENER="127.0.0.1"/LISTENER="0.0.0.0"/' /etc/default/distcc
sed -ie "s/JOBS=\"\"/JOBS=\"`grep processor /proc/cpuinfo | wc -l`\"/" /etc/default/distcc
sed -ie 's/ZEROCONF="false"/ZEROCONF="true"/' /etc/default/distcc
@KiNgMaR
KiNgMaR / cloudflare-ipset.sh
Last active January 22, 2024 17:28
Cloudflare IPTABLES and IPSET scripts - fixed 2022-02-23
#!/bin/bash
# name of the ipset - v4 or v6 will be appended.
IPSET_NAME=cloudflare-
# argument: v4 or v6 (defaults to v4)
cloudflare_ipset ()
{
local ipv
local inetv
@macdonst
macdonst / video.html
Created December 21, 2011 18:45
PhoneGap Android VideoPlayer Plugin example
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=320; user-scalable=yes" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>PhoneGap</title>
<script type="text/javascript" charset="utf-8" src="phonegap-1.1.0.js"></script>
<script type="text/javascript" charset="utf-8" src="video.js"></script>
<script type="text/javascript">