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 | |
branch=$(git branch | grep \* | cut -d ' ' -f2) | |
echo "Commit to '$branch', with message '$1'" | |
read -p "Wnat to continue? (y): " choice | |
if [ $choice == "y" ]; then | |
env -i | |
git add -A |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
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
SELECT setval('TABLENAME_id_seq', (SELECT MAX(id) FROM "TABLENAME")); | |
-- Literally replace TABLENAME with your table name: | |
-- SELECT setval('foo_id_seq', (SELECT MAX(id) FROM "foo")); |
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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.html [L] |
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 | |
# Renames all SVG files & convert commas to underscores, etc | |
find . -type f -name "*.svg" -print0 | while IFS= read -r -d '' file; do | |
mv "$file" "$(echo $(echo "$file" | tr ',' '_' | tr -d ' '))" | |
done |
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
@font-face { | |
font-family: 'HKGrotesk'; | |
src:url('../fonts/hkgrotesk-light.eot'); | |
src:url('../fonts/hkgrotesk-light.eot?#iefix') format('embedded-opentype'), | |
url('../fonts/hkgrotesk-light.woff2') format('woff2'), | |
url('../fonts/hkgrotesk-light.woff') format('woff'); | |
font-weight: 400; | |
font-style: normal; |
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
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks -MultiViews | |
RewriteEngine On | |
RewriteBase / | |
# Dev app sub domain masking | |
RewriteCond %{HTTP_HOST} ^dev\.yourdomain\.com$ [NC] | |
RewriteRule ^((?!dev/).*)$ /dev/$1 [L,NC] |
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
document.querySelectorAll(".list-card-title").forEach(n => console.log(n.textContent.substring(4))) |
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
useEffect(() => { | |
(async () => { | |
const result = await new Promise((res, rej) => res("Pretty neat")) | |
})() | |
}, []) // <- [] is important: https://reactjs.org/docs/hooks-effect.html |
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
import React from 'react' | |
import LoadingComponent from 'loading.component' | |
export default (fn, props) => { | |
const Component = React.lazy(fn) | |
return <React.Suspense fallback={<LoadingComponent />}><Component {...props} /></React.Suspense> | |
} | |
/** | |
* Example usage: |