Skip to content

Instantly share code, notes, and snippets.

View lepiaf's full-sized avatar

Thierry T. lepiaf

View GitHub Profile
@jonathantneal
jonathantneal / README.md
Last active March 19, 2024 23:31
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@gm3dmo
gm3dmo / gelfsender.sh
Last active November 16, 2023 04:47
Send a log message to a gelf server using the shell.
# This script can be used to raise a graylog2/gelf message
# gzip it and send it to a graylog server using netcat (nc)
hostname='gelftester'
short_message='test message short version'
full_message='longer test message. dont\n worry be happy'
level=1
facility='gelftester'
# gnu date
date=$(date +'%s.%N')
@gibtang
gibtang / gist:83f9681b525908900ec4b490992f032d
Created June 6, 2020 10:10
Simple sort of objects in a list using an attribute of type string
class cars:
def __init__(self, name, price):
self.name = name
self.price = price
unsorted_cars = []
unsorted_cars.append(cars('Ford', 20000))
unsorted_cars.append(cars('Volvo', 50000))
unsorted_cars.append(cars('BMW', 24000))
@clarkmcc
clarkmcc / delete-shutdown-pods.sh
Last active May 11, 2022 12:15
Deletes Kubernetes pods with a status of Shutdown that are usually left over after a GKE pre-emptible node goes offline.
#!/bin/sh
for namespace in $(kubectl get ns | awk '{print $1}' | grep -v NAME); do
for pod in $(kubectl get pod -n $namespace --field-selector=status.phase!=Running | grep Shutdown | awk '{print $1}' | grep -v NAME); do
kubectl delete pod -n "$namespace" "$pod"
done
done
@thedod
thedod / README.textile
Created November 8, 2010 15:43
Fairly Simple Simon - an Arduino memory game for 4 LEDs and 4 switches

Fairly Simple Simon – an Arduino memory game for 4 LEDs and 4 switches

The FSS is a simple board with 4 leds and 4 normally-closed switches
(each led goes via a 150Ohm resistor, and each switch has a 10KOhm
pull-resistor connecting between the output and ground).

See breadoard (made with fritzing):
Fairly Simple Simon on an imaginary http://fritzing.org bread... on Twitpic

In real life it ain’t that pretty :)

<?php
class DefaultController extends Controller
{
/**
* Dashboard page.
* @Permissions(perm="dashboard_view")
* @Route("/", name="ITEDashboardBundle_index")
* @Template()
* @return array