Skip to content

Instantly share code, notes, and snippets.

View soleo's full-sized avatar

Xinjiang Shao soleo

View GitHub Profile
@soleo
soleo / delete_branches_older_than.sh
Created June 1, 2020 20:55 — forked from AvnerCohen/delete_branches_older_than.sh
Script to delete branches older than 6 months old, ignore local vs remote errors.
#!/bin/sh
ECHO='echo '
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do
if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then
if [[ "$DRY_RUN" = "false" ]]; then
ECHO=""
fi
local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///')
$ECHO git branch -d $local_branch_name
@soleo
soleo / delete_branches_older_than.sh
Last active June 1, 2020 20:59 — forked from AvnerCohen/delete_branches_older_than.sh
Script to delete branches older than 6 months old, ignore local vs remote errors.
#!/bin/sh
ECHO='echo '
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$' | grep -v 'release'); do
if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then
if [[ "$DRY_RUN" = "false" ]]; then
ECHO=""
fi
local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///')
$ECHO git branch -d $local_branch_name
@soleo
soleo / buildChromiumICECC.sh
Created February 23, 2020 20:01
buildChromiumICECC.sh
#!/bin/bash
if [ "$#" -lt 1 ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]
then
echo "Usage : c.sh [Build options] [Test modules] [Options]"
echo ""
echo "Build options:"
echo " Debug Debug build"
echo " Release Release build"
echo " Ozone Ozone port build (Only release build)"
@soleo
soleo / buildChromiumICECC.sh
Created February 23, 2020 20:01
buildChromiumICECC.sh
#!/bin/bash
if [ "$#" -lt 1 ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]
then
echo "Usage : c.sh [Build options] [Test modules] [Options]"
echo ""
echo "Build options:"
echo " Debug Debug build"
echo " Release Release build"
echo " Ozone Ozone port build (Only release build)"
@soleo
soleo / buildChromiumICECC.sh
Created February 23, 2020 20:01
buildChromiumICECC.sh
#!/bin/bash
if [ "$#" -lt 1 ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]
then
echo "Usage : c.sh [Build options] [Test modules] [Options]"
echo ""
echo "Build options:"
echo " Debug Debug build"
echo " Release Release build"
echo " Ozone Ozone port build (Only release build)"
@soleo
soleo / buildChromiumICECC.sh
Created February 23, 2020 20:01
buildChromiumICECC.sh
#!/bin/bash
if [ "$#" -lt 1 ] || [ "$1" == "--help" ] || [ "$1" == "-h" ]
then
echo "Usage : c.sh [Build options] [Test modules] [Options]"
echo ""
echo "Build options:"
echo " Debug Debug build"
echo " Release Release build"
echo " Ozone Ozone port build (Only release build)"
@soleo
soleo / gist:23f7c84fe2ddb9212a65971f57ae3902
Created June 12, 2018 20:27
FluentConf 2018: Web performance API deep dive
// #1 High Res Time, Performance.Now
(function(){
var start = performance.now();
for(var i=0; i<=1000000; i++) {
}
var end = performance.now()
console.log('Measure:', end-start);
})();
@soleo
soleo / index.html
Created August 21, 2017 01:59
Vertically Center Things - Absolute Positioning
<div class="container">
<div class="element-center">
<img class="peapod-logo" src="https://www.peapod.com/shop/images/favicon/apple-icon-180x180.png" />
<h1 class="peapod-text">
Peapod
</h1>
</div>
</div>
@soleo
soleo / index.html
Created August 21, 2017 01:46
Vertically Center Things - Table Cell
<div class="table-container">
<div class="table-row">
<img class="peapod-logo" src="https://www.peapod.com/shop/images/favicon/apple-icon-180x180.png" />
<h1 class="peapod-text">
Peapod
</h1>
</div>
</div>
@soleo
soleo / index.html
Last active August 21, 2017 01:41
Vertically Center Things - Flexbox
<div class="flex-container">
<img class="peapod-logo" src="https://www.peapod.com/shop/images/favicon/apple-icon-180x180.png" />
<h1 class="peapod-text">
Peapod
</h1>
</div>