Skip to content

Instantly share code, notes, and snippets.

View dennis-tra's full-sized avatar
🇺🇦

Dennis Trautwein dennis-tra

🇺🇦
View GitHub Profile
@dennis-tra
dennis-tra / AWS-lambda-create-new-task-definition
Created June 21, 2016 12:44
AWS Lambda function which registers a new task definition and updates the current service
exports.handler = function(event, context, callback) {
var aws = require('aws-sdk');
aws.config.update({region:'ap-southeast-2'});
var ecs = new aws.ECS();
var taskDefinition = 'nab-property-tool';
var serviceName = 'nab-property-tool';
var clusterName = 'default';
console.log("Creating new Task");
@dennis-tra
dennis-tra / Custom-Dogs.tmTheme
Last active July 23, 2016 03:10
Sublime Text 3 color scheme based on 'Dogs'. I use it together with equinusocio/material-theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>Michael Sheets, James Cleveland</string>
@dennis-tra
dennis-tra / input-checkbox.scss
Last active August 15, 2016 09:32
CSS of a HTML checkbox
// <input type="checkbox" id="1"><label for="1"></label>
$checkbox-color: white;
$checkbox-color-checked: green;
input[type="checkbox"] {
display: none;
& + label:before {
background: $checkbox-color;
set macro
##### Color Palette by Color Scheme Designer
##### Palette URL: http://colorschemedesigner.com/#3K40zsOsOK-K-
blue_000 = "#A9BDE6" # = rgb(169,189,230)
blue_025 = "#7297E6" # = rgb(114,151,230)
blue_050 = "#1D4599" # = rgb(29,69,153)
blue_075 = "#2F3F60" # = rgb(47,63,96)
blue_100 = "#031A49" # = rgb(3,26,73)
ffmpeg -start_number 0052809 -framerate 30 -i G%07d.JPG -c:v libx264 output.mp4
@dennis-tra
dennis-tra / DoubleSlider.py
Created January 20, 2017 10:46
PyQt - QSlider for float or double values + tests
from PyQt5.QtWidgets import QSlider
class DoubleSlider(QSlider):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.decimals = 5
self._max_int = 10 ** self.decimals
super().setMinimum(0)
![Logo of the project](./images/logo.sample.png)
# Name of the project
> Additional information or tag line
A brief description of your project, what it is used for.
## Installing / Getting started
A quick introduction of the minimal setup you need to get a hello world up &
@dennis-tra
dennis-tra / gist:d097e90e639f5568f388db4f0e9a8e35
Created July 13, 2017 11:30
Gnuplot fit gaussian curve
gauss(x)=a/(sigma*sqrt(2.*pi))*exp(-(x-mu)**2./(2.*sigma**2))
fit gauss(x) ‘gaussTest.dat’ via a, sigma, mu
plot "data.csv" u 1:2, gauss(x)
@dennis-tra
dennis-tra / sas.go
Created January 10, 2019 08:14
A little helper function to generate the shared access token (SAS) to talk to e.g. Azure Notification Hubs
package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"fmt"
"net/url"
"strconv"
"text/template"

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database