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 ll="ls -al" | |
alias c="clear" | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias ~="cd ~" | |
if [ -f ~/.docker_aliases ]; then | |
. ~/.docker_aliases | |
fi |
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 | |
# FROM: https://engineering.taboola.com/calculating-git-version/ | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
latest=$(git tag -l --merged master --sort='-*authordate' | head -n1) | |
semver_parts=(${latest//./ }) | |
major=${semver_parts[0]} | |
minor=${semver_parts[1]} |
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 | |
namespace EasyXML; | |
use SimpleXMLElement; | |
use DOMDocument; | |
use Closure; | |
class Element extends SimpleXMLElement | |
{ |
We can't make this file beautiful and searchable because it's too large.
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
zip,city,state,state_abbr,county,count_code,latitude,longitude | |
99553,Akutan,Alaska,AK,Aleutians East,13,54.143,-165.7854 | |
99571,Cold Bay,Alaska,AK,Aleutians East,13,55.1858,-162.7211 | |
99583,False Pass,Alaska,AK,Aleutians East,13,54.841,-163.4368 | |
99612,King Cove,Alaska,AK,Aleutians East,13,55.0628,-162.3056 | |
99661,Sand Point,Alaska,AK,Aleutians East,13,55.3192,-160.4914 | |
99546,Adak,Alaska,AK,Aleutians West,16,51.88,-176.6581 | |
99547,Atka,Alaska,AK,Aleutians West,16,52.1224,-174.4301 | |
99591,Saint George Island,Alaska,AK,Aleutians West,16,56.5944,-169.6186 |
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
SED=`which sed` | |
CURRENT_DIR=`dirname $0` | |
echo "What is the domain?" | |
read DOMAIN | |
# check the domain is valid! | |
PATTERN="^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$"; | |
if [[ "$DOMAIN" =~ $PATTERN ]]; then | |
DOMAIN=`echo $DOMAIN | tr '[A-Z]' '[a-z]'` |
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
(function (angular) { | |
angular.module('column.totals', []) | |
.directive('columnTotal', ['$timeout', function ($timeout) { | |
function getOffset(elem) { | |
let offset = 0; | |
let prev = elem.previousElementSibling; | |
while (prev) { | |
offset++; | |
prev = prev.previousElementSibling; | |
} |
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 StateList = [ | |
{id: 'AL', name: 'Alabama'}, | |
{id: 'AK', name: 'Alaska'}, | |
{id: 'AZ', name: 'Arizona'}, | |
{id: 'AR', name: 'Arkansas'}, | |
{id: 'CA', name: 'California'}, | |
{id: 'CO', name: 'Colorado'}, | |
{id: 'CT', name: 'Connecticut'}, | |
{id: 'DE', name: 'Delaware'}, | |
{id: 'DC', name: 'District Of Columbia'}, |
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
SED=`which sed` | |
CURRENT_DIR=`dirname $0` | |
echo "What is the domain?" | |
read DOMAIN | |
# check the domain is valid! | |
PATTERN="^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$"; | |
if [[ "$DOMAIN" =~ $PATTERN ]]; then | |
DOMAIN=`echo $DOMAIN | tr '[A-Z]' '[a-z]'` |
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 | |
namespace App\Models\Traits; | |
trait WhereHasWithTrait | |
{ | |
public function scopeWhereHasWith($query, $relation, \Closure $closure) | |
{ | |
return $query->whereHas($relation, $closure)->with([$relation => $closure]); | |
} |
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 adSaveCreateOverWrite = 2 | |
Const adTypeBinary = 1 | |
Dim htmlSrc, dstDir | |
htmlSrc = InputBox("Enter Html File Name") & ".html" | |
dstDir = InputBox("Enter Folder Name To Place Images") | |
'***************************************************************** | |
'** Download the image | |
' strResult = GetImage(strSource, strDest) | |
getImgTagUrl htmlSrc, dstDir |
NewerOlder