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
# syntax=docker/dockerfile:1 | |
# Keep this syntax directive! It's used to enable Docker BuildKit | |
# Based on https://github.com/python-poetry/poetry/discussions/1879?sort=top#discussioncomment-216865 | |
# but I try to keep it updated (see history) | |
################################ | |
# PYTHON-BASE | |
# Sets up all our shared environment variables | |
################################ |
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
#!/usr/bin/env bash | |
# | |
# Fix virtualenv symlinks after upgrading python with Homebrew and then running | |
# `cleanup`. | |
# | |
# After upgrading Python using Homebrew and then running `brew cleanup` one can | |
# get this message while trying to run python: | |
# dyld: Library not loaded: @executable_path/../.Python | |
# Referenced from: /Users/pablo/.venv/my-app/bin/python | |
# Reason: image not found |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
########################################### | |
# IMPORTANT NOTE: | |
# | |
# As of asuswrt-merlin 380.67 Beta, you | |
# can now configure SSL certificates from | |
# the Webui, making these instructions | |
# unnecessary. | |
########################################### | |
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 | |
class BlogController extends Controller | |
{ | |
/** | |
* Posts | |
* | |
* @return void | |
*/ | |
public function showPosts() |
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
# replace PAPERTRAIL_HOSTNAME and PAPERTRAIL_PORT | |
# see http://help.papertrailapp.com/ for additional PHP syslog options | |
function send_remote_syslog($message, $component = "web", $program = "next_big_thing") { | |
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); | |
foreach(explode("\n", $message) as $line) { | |
$syslog_message = "<22>" . date('M d H:i:s ') . $program . ' ' . $component . ': ' . $line; | |
socket_sendto($sock, $syslog_message, strlen($syslog_message), 0, PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT); | |
} | |
socket_close($sock); |