This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Usage | |
----- | |
Change the channel ID, specify the slackUserToken environment | |
variable, then pipe the report through this script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bash multi flock | |
# | |
# allow 3 instances of a bash function running at the same time | |
run_instance() { | |
( | |
flock -n 99 || return 1 | |
echo "starting instance $@..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# | |
# Bash helper functions for logging. | |
# | |
# Inspired in Python logging. Ready to source it in your bash script. | |
# It can redirect all the output to a file and also redirect all the | |
# trace to another file, which is useful for debugging. | |
# | |
# Usage: see how to use it in the test at the bottom. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Utility for Puppet that outputs orphaned resources. Orphaned are | |
# resources that where at one point managed by Puppet, but they no | |
# longer are. | |
# | |
# We need to require Puppet because deserializing the report produces | |
# Puppet objects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js canvas - geometry - cube</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
font-family: Monospace; | |
background-color: #f0f0f0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import sin, cos | |
from random import random | |
size(900,200) | |
speed(30) | |
def setup(): | |
global cnt | |
cnt = 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/karma.conf.js b/test/karma.conf.js | |
index c1004d6..0eb253c 100644 | |
--- a/test/karma.conf.js | |
+++ b/test/karma.conf.js | |
@@ -47,7 +47,7 @@ logLevel = LOG_INFO; | |
// enable / disable watching file and executing tests whenever any file changes | |
-autoWatch = true; | |
+autoWatch = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cairo | |
from gi.repository import Gtk | |
from gi.repository import Gdk | |
from gi.repository import GdkPixbuf | |
from gi.repository import GObject | |
import sys | |
def _surface_from_file(file_location, ctx): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test GTK3+ GtkTreeModel in PyGI | |
from gi.repository import Gtk | |
store = Gtk.ListStore(str, str) | |
view = Gtk.TreeView() | |
view.set_model(store) |