This file contains hidden or 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: Force push current branch | |
alias gpf="git push --no-verify --force-with-lease --force-if-includes" | |
# Git: Get the commit hash from which the current branch was forked | |
alias gfch="diff -u <(git rev-list --first-parent \$(git rev-parse --abbrev-ref HEAD)) <(git rev-list --first-parent origin main) | sed -ne 's/^ //p' | head -1" | |
# Git: Rebase interactive commits compared to the branch from which the current branch was forked | |
alias gri="git rebase -i \$(gfch)" | |
# Git: Rebase interactive commits compared to the branch from which the current branch was forked with autostash |
This file contains hidden or 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
source /opt/homebrew/share/antigen/antigen.zsh | |
# Load the oh-my-zsh's library. | |
antigen use oh-my-zsh | |
# Bundles from the default repo (robbyrussell's oh-my-zsh). | |
antigen bundle git | |
# Syntax highlighting bundle. | |
antigen bundle zsh-users/zsh-syntax-highlighting |
This file contains hidden or 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 | |
require __DIR__.'/vendor/autoload.php'; | |
function dateToIso8601($date) { | |
return $date->format("Ymd") . "T" . $date->format("His") . "Z"; | |
} | |
function getCurrentDateUtc() { |
This file contains hidden or 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 | |
$hostsFile = ""; | |
const SLEEP_TIME_SECONDS = 3600; // An hour | |
function addLine($line, $lineBreaksBefore = 0, $lineBreaksAfter = 0) { | |
global $hostsFile; | |
for ($i = 0; $i<$lineBreaksBefore; $i++) { | |
$hostsFile .= "\n"; |
This file contains hidden or 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 | |
namespace UpsideDownText; | |
class UpsideDownText { | |
public static function convert_to_upsidedown_unicode($match) | |
{ | |
$flipTable = array( | |
'!' => '¡', | |
'¡' => '!', |