This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.0' | |
services: | |
blackfire: | |
image: blackfire/blackfire | |
environment: | |
BLACKFIRE_SERVER_ID: "bbca40d2-459c-4e5e-a87f-42b8eed72417" | |
BLACKFIRE_SERVER_TOKEN: "cd660acd7a9a2365e5007e1329191032a8c464bbf018697aaca92e33d793a59f" | |
BLACKFIRE_CLIENT_ID: "9f37bbd8-cff1-41dd-ae03-84dee0bc753d" | |
BLACKFIRE_CLIENT_TOKEN: "c9e53296c4d78e92ae093f6fc5f8b11ccda375a8ae29d30d82acaa2d0d30c693" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function calltrace() { | |
$backtrace = debug_backtrace(); | |
$filetrace = array_column($backtrace, 'file'); | |
$linetrace = array_column($backtrace, 'line'); | |
dump(array_map(function($index) use ($filetrace, $linetrace) { | |
return $filetrace[$index] . ':' . $linetrace[$index]; | |
}, array_keys($filetrace))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM This assumes that you have the "composer" binary on your global $PATH | |
@echo off | |
set params=%* | |
bash.exe -c "composer %params%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import chai, { expect } from 'chai'; | |
import spies from 'chai-spies'; | |
import { shallowMount, createLocalVue } from '@vue/test-utils'; | |
import Vuex from 'vuex'; | |
import Actions from '@/components/Actions.vue'; | |
const localVue = createLocalVue(); | |
localVue.use(Vuex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while getopts ":f:b:" o; do | |
case "${o}" in | |
f) | |
foo=${OPTARG} | |
;; | |
b) | |
bar=${OPTARG} | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
optspec=":-:" | |
while getopts "${optspec}" optchar; do | |
case "${optchar}" in | |
-) | |
case "${OPTARG}" in | |
*) | |
value=${OPTARG#*=} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Restart DisplayLink service after waking up from suspend | |
After=suspend.target hibernate.target | |
[Service] | |
Type=oneshot | |
ExecStart=systemctl -f restart displaylink # This might take a while, but it runs in the background, so don't worry about it. | |
[Install] | |
WantedBy=suspend.target hibernate.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sanitizeAmount = amount => { | |
return amount | |
.replace(/[^\d.]/g, '') // Remove non-numeric symbols | |
.replace(/\.(?!\d+$)/g, ''); // Remove excess "." symbols, and leave out the last "." | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Match on all types of devices but joysticks | |
# | |
# If you want to configure your devices, do not copy this file. | |
# Instead, use a config snippet that contains something like this: | |
# | |
# Section "InputClass" | |
# Identifier "something or other" | |
# MatchDriver "libinput" | |
# | |
# MatchIsTouchpad "on" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Restart USB ports after waking up from suspend/hibernate | |
After=suspend.target hibernate.target | |
[Service] | |
Type=oneshot | |
ExecStart=/opt/usr/bin/reset-usb-ports.sh | |
[Install] | |
WantedBy=suspend.target hibernate.target |