Skip to content

Instantly share code, notes, and snippets.

View kraiz's full-sized avatar

Lars Kreisz kraiz

  • Dresden - Germany
View GitHub Profile
name thread_pitch ext_diameter int_diameter
M0.25x0.075 0.075 0.15 0.2655
M0.3x0.09 0.09 0.181 0.318
M0.3x0.08 0.08 0.1935 0.3165
M0.35x0.09 0.09 0.231 0.368
M0.4x0.1 0.1 0.268 0.4195
M0.45x0.1 0.1 0.318 0.4695
M0.5x0.125 0.125 0.336 0.5235
M0.55x0.125 0.125 0.386 0.5735
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active June 17, 2024 15:05
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@Xowap
Xowap / gulp.py
Last active February 10, 2018 22:51
Gulp Assets
# vim: fileencoding=utf-8 tw=100 expandtab ts=4 sw=4 :
from __future__ import unicode_literals
import json
import codecs
class AssetsLister(object):
def __init__(self, live, manifest):
@enxt
enxt / TuneRPI.sh
Last active August 12, 2017 21:01
Bash script to slimming raspbian image and prepare with nginx and php
#!/bin/sh
sudo apt-get update
sudo apt-get -y upgrade
sudo dpkg-reconfigure tzdata
sudo apt-get -y install console-data locales
sudo dpkg-reconfigure console-data
sudo dpkg-reconfigure locales
# Written by Aaron Cohen -- 1/14/2013
# Brought to you by BitTorrent, Inc.
# "We're not just two guys in a basement in Sweden." TM
#
# This work is licensed under a Creative Commons Attribution 3.0 Unported License.
# See: http://creativecommons.org/licenses/by/3.0/
import sys
import re
import socket
@EwanDawson
EwanDawson / regex-capture.groovy
Created April 17, 2012 16:09
Idiomatic regex group capturing in Groovy
// Using Matcher object returned by =~ operator
matcher = "Hello world v1.01" =~ /.* v(\S*)/
if (matcher.matches()) version = matcher[0][1]
assert version == "1.01"
// We can make this a little tidier using the 'with' method
version = ("Hello world v1.01" =~ /.* v(\S*)/).with { matches() ? it[0][1] : null }
assert version == "1.01"
@jmoiron
jmoiron / crawler.py
Created May 27, 2011 20:37
Simple gevent/httplib2 web crawler.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple async crawler/callback queue based on gevent."""
import traceback
import logging
import httplib2
import gevent