A Pen by Louay Akkad on CodePen.
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 diff --name-status | |
gh api repos/$OWNER/$REPO/compare/$HEAD...$BASE | jq -r ' | |
.files[] | | |
( | |
( | |
if .status == "modified" then "M" | |
elif .status == "added" then "A" | |
elif .status == "removed" then "D" | |
else "?" | |
end |
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
# Export to a folder | |
mkdir -p db | |
cd db | |
curl -k $REPLIT_DB_URL?prefix= | xargs -I@ curl -k -O "$REPLIT_DB_URL/@" | |
cd .. | |
tar -czvf db.tar.gz db | |
# Then download db.tar.gz manually |
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
/** | |
* @author Louay Alakkad (github.com/louy) | |
* @license MIT https://opensource.org/licenses/MIT | |
*/ | |
import React from 'react' | |
import PropTypes from 'prop-types' | |
import { | |
NativeModules, | |
ViewProps, | |
ViewPropTypes, |
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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Prototype</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script src="https://unpkg.com/react@16.7.0-alpha.2/umd/react.production.min.js"></script> | |
<script src="https://unpkg.com/react-dom@16.7.0-alpha.2/umd/react-dom.production.min.js"></script> |
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
# AWS MFA session util | |
# Setup: | |
# assuming you're using a profile called "default": | |
# In ~/.aws/config, set up a default-mfa-temp profile: | |
# ``` | |
# [default] | |
# region = eu-west-2 | |
# [default-mfa-temp] | |
# region = eu-west-2 |
I hereby claim:
- I am louy on github.
- I am louay (https://keybase.io/louay) on keybase.
- I have a public key ASBtmGtwrtSjxZxz-xcoWXvlt2aQt_RP7QT7QbdYobGkzwo
To claim this, I am signing this object:
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 | |
set -e | |
git branch | grep -v "master" | xargs git branch -d | |
git fetch origin --prune |
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
daemon off; | |
user nginx; | |
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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 | |
# http://stackoverflow.com/a/2179876/1644422 | |
for FILE in $(git ls-files) | |
do | |
TIME=$(git log --pretty=format:%cd -n 1 --date=iso $FILE) | |
TIME=$(date -j -f '%Y-%m-%d %H:%M:%S %z' "$TIME" +%Y%m%d%H%M.%S) | |
touch -m -t $TIME $FILE | |
done |
NewerOlder