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
[alias] | |
wip = !"git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m \"wip\"" | |
unwip = !"git log -n 1 | grep -q -c wip && git reset HEAD~1" | |
rb = !"git wip;git rebase -i origin/master;git unwip" | |
pr = !"git fetch;git wip;git rebase --stat origin;git unwip;git heads" | |
head = !"git log -n1" | |
lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'" | |
heads = !"git log origin/master.. --format='%Cred%h%Creset;%C(yellow)%an%Creset;%H;%Cblue%f%Creset' | git name-rev --stdin --always --name-only | column -t -s';'" |
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 | |
/** | |
* for code completion | |
* | |
* @link http://docs.php.net/manual/en/book.gearman.php | |
*/ | |
if (false) { | |
define('GEARMAN_SUCCESS', 0); |
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/perl | |
use strict; | |
use warnings; | |
use Getopt::Long qw(:config no_ignore_case ); | |
my $replace = undef; | |
my $delete = undef; | |
my $help = 0; | |
GetOptions ( |
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/sh | |
commit=`git log | grep commit | head -1 | cut -d ' ' -f2` | |
echo $commit |
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
## CRONTAB HINTS AND TIPS | |
## | |
## | |
## Entry Description Equivalent To | |
## @yearly (or @annually) Run once a year at midnight in the morning of January 1 0 0 1 1 * | |
## @monthly Run once a month at midnight in the morning of the first of the month 0 0 1 * * | |
## @weekly Run once a week at midnight in the morning of Sunday 0 0 * * 0 | |
## @daily Run once a day at midnight 0 0 * * * | |
## @hourly Run once an hour at the beginning of the hour 0 * * * * | |
## @reboot Run at startup @reboot |
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 | |
/** | |
* Password Hash Cost Calculator | |
* | |
* Set the ideal time that you want a password_hash() call to take and this | |
* script will keep testing until it finds the ideal cost value and let you | |
* know what to set it to when it has finished | |
*/ | |
// Milliseconds that a hash should take (ideally) |
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/sh | |
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <sanderthedragon@zoho.com> | |
# | |
# SPDX-License-Identifier: MIT | |
arch=$(dpkg --print-architecture) | |
echo "Detected architecture: $arch" | |
case "$arch" in |
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 rebase "$(git merge-base HEAD master)" -x 'git commit --amend -C HEAD --date="$(date -R)" && sleep 1.05' |