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
http://{$CADDY_HOST}:{$CADDY_PORT} { | |
root * ./public | |
@notStatic { | |
not { | |
file { | |
try_files {path} | |
} | |
} | |
} |
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
#These are the steps required in order to Install ImageMagick with JPG, PNG and TIFF delegates. | |
sudo apt-get update | |
#Install Build-Essential in order to configure and make the final Install | |
sudo apt-get install build-essential | |
#libjpg62-dev required in order to work with basic JPG files |
This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.
I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)
Before trying it out DIY, I considered using:
- Video 4 Linux loopback device kernel module (
v4l2loopback
) - Source: https://github.com/umlaeute/v4l2loopback (You might find builds in your distro's repos - I'm using Fedora so had to build it myself using https://github.com/danielkza/v4l2loopback-fedora/) - gPhoto2 - this is what allows you to access your cameras live feed over USB - this was available in Fedora's repos.
- GStreamer or ffmpeg - this is what lets you stream the output from gPhoto2 into the loopback device.
It's been a little while since I set it all up so I can't remember all of the installation details, which will probably be different for your distro anyway unless you're using Fedora. Apologies if I have forgotten something as wel.
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
# This is a blocklist to block samsung smart tv's sending meta data at home. | |
# Please help to collect domains! | |
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident. | |
# https://gist.github.com/Perflyst/315f86393712a0c2107ee8eb58c6acee | |
0.0.0.0 device-metrics-us.amazon.com | |
0.0.0.0 samsungacr.com | |
0.0.0.0 samsungcloudsolution.com | |
0.0.0.0 samsungcloudsolution.net | |
0.0.0.0 pavv.co.kr |
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
<# | |
.SYNOPSIS | |
Script to Initialize my custom powershell setup. | |
.DESCRIPTION | |
Script uses scoop | |
.NOTES | |
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted. | |
Author: Mike Pruett | |
Date: October 18th, 2018 |
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
{"lastUpload":"2021-08-31T09:12:11.160Z","extensionVersion":"v3.4.3"} |
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
# lib/tasks/db.rake | |
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90 | |
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6 | |
# | |
# This is the code from the comment: | |
# https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90#gistcomment-2275324 | |
# Made into a fork/separate gist for easier download, with redundant shell-script removed. | |
# | |
# | |
# Usage: |
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 | |
# | |
# This file echoes a bunch of 24-bit color codes | |
# to the terminal to demonstrate its functionality. | |
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m | |
# The background escape sequence is ^[48;2;<r>;<g>;<b>m | |
# <r> <g> <b> range from 0 to 255 inclusive. | |
# The escape sequence ^[0m returns output to default | |
setBackgroundColor() |
NewerOlder