Skip to content

Instantly share code, notes, and snippets.

View bardware's full-sized avatar

Bernhard Döbler bardware

View GitHub Profile
@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 August 29, 2025 22:46
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):

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 6, 2026 18:32
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Application.cfc
component extends=framework.one {
this.ormenabled = true;
this.datasource = "store";
this.ormSettings.dbCreate = "dropcreate";
this.ormSettings.logsql = true;
this.ormSettings.dialect = "Oracle10g";
variables.framework.reloadApplicationOnEveryRequest = true;
@CannonballSkippy
CannonballSkippy / Convert audio to video with ffmpeg - examples.md
Created April 1, 2017 10:48
A list of examples on how you can use filters to make visual representations of audio using ffmpeg

Convert audio to video with ffmpeg - examples

ffmpeg -i input.mp3 -filter_complex "[0:a]avectorscope=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a avectorscope.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]showcqt=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a showcqt.mp4
ffmpeg -i input.mp3 -filter_complex "[0:a]ahistogram=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a ahistogram.mp4
@aaronhoffman
aaronhoffman / git-bc.cmd
Created March 2, 2017 02:50
Configure Beyond Compare 4 as git diff tool on windows 10
git config --global diff.tool bc
git config --global difftool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe"
git config --global merge.tool bc
git config --global mergetool.bc.path "C:\Program Files\Beyond Compare 4\BComp.exe"
git config --global alias.mydiff "difftool --dir-diff --tool=bc --no-prompt"
@pR0Ps
pR0Ps / gen-flac-visuals
Created January 22, 2017 01:54
Generates spectrogram and waveform images from flac files
#!/bin/sh
# Requires: audiowaveform (https://github.com/bbc/audiowaveform), metaflac, sox
zoom_start=60
zoom_duration=4
zoom_end=$((zoom_start + zoom_duration))
if [ $# -lt 1 ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
echo "Generates spectrogram and waveform images from flac files"
@JamoCA
JamoCA / ColdFusionNumberTesting.cfm
Last active October 1, 2019 08:56
ColdFusion Validation Testing of Number-like Values w/Leading/Ttrailing Hidden Characters - Chr(28).
<!--- 00501 = Zipcode for Holtsville, NY. 10.50 = Dollar Display Amount
12/29/2016: ColdFusion 2016 indicates valid numeric, float and zipcode. Lucee 5 further indicates valid integer.
9/11/2017: Added CFParam & CFQueryParam Tests to see if value is considered a valid integer by those functions
9/11/2017: Added Dan Bracuk demo to remove commas and compare VAL() to Round(). (Fail) --->
<cfscript>
/* http://cflib.org/udf/IsInt */
function isInt(varToCheck){
return ucase(isNumeric(varToCheck) and round(varToCheck) is vartoCheck);
}