Skip to content

Instantly share code, notes, and snippets.

View bbredewold's full-sized avatar
🖖

Bert Bredewold bbredewold

🖖
  • The Netherlands
  • 12:39 (UTC +02:00)
View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use File::Temp qw( tempfile );
use Mojo::UserAgent;
use Sereal qw( decode_sereal encode_sereal );
#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
@phillipgreenii
phillipgreenii / README.md
Last active November 16, 2023 16:04
Running NPM Scripts through maven

I am in the process of introducing single page applications to where I work. For development, using node based build tools is much easier for the single page applications. However, the build process for our organization is based upon maven. Our solution started with the maven plugin frontend-maven-plugin. It worked great at first, but then we ran into a situation that I couldn't make work with it.

As stated before, at our organization, we have the older ecosystem which is maven and the newer ecosystem which is node. Our goal was to keep the hacking to a minimum. We did this by putting all of the hacks into a single super node based build file. This is what maven calls and the reason frontend-maven-plugin wasn't sufficient. The super node based build script calls all of the other build scripts by spawning npm run. Try as I might, I could not figure out how to make the spawn work. front-end-maven-plugin downloads npm

@EspadaV8
EspadaV8 / overrides.css
Last active May 19, 2020 06:58
Dark Laravel Docs theme
body {
color: #ccc;
background: #525252 url("/assets/img/cloud-bar.png") repeat-x;
}
.docs article code[class*="language-"],
.docs article pre[class*="language-"] {
font-size: 14px;
}
@markokoleznik
markokoleznik / day03part1.py
Created December 3, 2016 21:58
Day 3, Part 1 (Python 3)
print(len(list(filter(lambda y: y[0] + y[1] > y[2], [sorted(list(map(int, x.split()))) for x in open('problem03/input.txt', 'r').read().split('\n')]))))
@m2wasabi
m2wasabi / deploy.cmd
Created December 7, 2016 11:35
PHP autodeploy with Laravel example
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.9
:: ----------------------
:: Prerequisites
:: -------------
@itod
itod / split_keyboards.md
Last active May 23, 2024 01:51
Every "split" mechanical keyboard currently being sold that I know of
@danielhanold
danielhanold / dkc-batch.sh
Last active November 3, 2023 13:51
Run multiple docker-compose files at once
#!/bin/bash
# @file
# If an application is comprised of multiple docker-compose.yml files, this file
# allows you to execute docker-compose commands for all files in a batch.
# For this to work, place this file into a directory and place each
# docker-compose environment in a subdirectory.
#
# Example:
# /maindir
@daliborgogic
daliborgogic / entry-client.js
Last active July 1, 2019 09:51
Vue.js SPA Google Analytics
// https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
)
@mlewand
mlewand / renderRect.js
Last active May 16, 2024 19:34
DOMRect visualisation - a small helper for visualizing DOMRect objects.
( function() {
/**
* A helper function to visualize DOMRect or set of DOMRect instances.
*
* Subsequent calls will remove previously marked elements.
*
* Debug a element currently focused in your devtools inspector.
* window.markRect( $0.getBoundingClientRect() );
* // Debug a selection.
* window.markRect( document.getSelection().getRangeAt( 0 ).getClientRects() );