Skip to content

Instantly share code, notes, and snippets.

View bardware's full-sized avatar

Bernhard Döbler bardware

View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 8, 2024 20:45
set -e, -u, -o, -x pipefail explanation
@victor-perez
victor-perez / git.bat
Last active August 4, 2021 14:16
Use WSL git inside VS Code from Windows 10 17046
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
::this also support calls that contains a absolute windows path
::check of one of the params contain a absolute windows path
echo.%* | findstr /r /c:"[a-z]:[\\/]" > nul
if %errorlevel% == 1 (
::if not just git with the given parameters
call :git %*
ncdu => df in gut
glances => modernes htop
github hub => cli tool
lnav => log viewer
goaccess => log viewer für webserver
task warrior => cli task management
gopass => gpg pw manager (pass ableger)
mosh => ssh client über udp
silversurfer => ack on steroids / platinum searcher
a(s?)cinema => bash session recording
@elijahmanor
elijahmanor / .prettierrc
Created March 20, 2018 01:52
Prettier Overrides per fileType
{
"singleQuote": true,
"overrides": [
{
"files": "src/**/*.css",
"options": {
"singleQuote": false
}
}
]
@anthrotype
anthrotype / ttdiff.sh
Last active July 18, 2018 10:03
Compare fonts with fonttools ttx
# compare fonts with ttx
ttdiff () {
if [ "$#" -lt 2 ]
then
echo "Usage: ttdiff FONT1.ttf FONT2.ttf [tables ...]"
return 1
fi
first="$1"
if [ ! -f "$first" ]; then
echo "File $first not found"

Font "package manager"

I've been thinking about creating a font management service similar to traditional software package managers (e.g. Debian Aptitude, NPM, etc.)

The basic idea is this:

  1. There's a main repository of fonts that are free (as in free to distribute) that the working group hosts
  2. There's a small program that serves as the "manager", to be used or installed on client systems
  3. The "manager" can be configured to operate with multiple repositories
@elijahmanor
elijahmanor / package.json
Created January 10, 2018 14:46
npm script with color!
{
"name": "colors",
"version": "0.1.0",
"description": "",
"main": "index.js",
"scripts": {
"color1": "echo '\\033[31mHello\\033[0m World'",
"color2": "echo \"\\033[31mHello\\033[0m World\""
},
"keywords": [],
anonymous
anonymous / trycf-gist.cfm
Created December 7, 2017 20:57
TryCF Gist
<cfset dNow = Now()>
<cfset dateTimeVar = #dateTimeFormat( dNow, "yyyy.MM.dd HH:nn:ss" )# />
<cfdump var="#dNow#">
<cfdump var="#dateTimeVar#">
<cfscript>
function fixedParseDateTime (dte, mask) {
var sdf = createObject("java", "java.text.SimpleDateFormat").init(mask);
return sdf.parse(dte);
}
@Zemnmez
Zemnmez / tweetdeck-limit-override-dm-rt-fix.js
Last active March 13, 2023 15:21
tweetdeck-limit-override.js
/*
This snippet is esssentially the same as being in the Twitter longer tweets test, for tweetdeck.
The Tweet length counter is fixed by tricking TweetDeck into counting up to 140 characters, twice, so you'll see 140
instead of 280 in the counter but going over 140 will give you another set of 140 charactrs.
*/
TD.services.TwitterClient.prototype.makeTwitterCall=function(b,e,f,g,c,d,h){c=c||function(){};d=d||function(){};b=this.request(b,{method:f,params:Object.assign(e,{weighted_character_count:!0}),processor:g,feedType:h});return b.addCallbacks(function(a){c(a.data)},function(a){d(a.req,"",a.msg,a.req.errors)}),b};
twttrTxt=Object.assign({},twttr.txt,{isInvalidTweet:function(){return!1},getTweetLength:function(x){return x=twttr.txt.getTweetLength.apply(this,arguments),x<140||x/140>2?x:x%140}});
@strarsis
strarsis / docker-on-wsl-windows-10-home-docker-toolbox.md
Last active September 4, 2023 07:29
Notes about Docker on WSL (Windows 10 Home / Docker Toolbox) (Virtualbox instead Hyper-V)

Edit (September 2020):