- company location / remote?
- what project management method?
- good and bad company culture?
- performance reviews?
- what's the path to profitability?
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 | |
FILE=$1 | |
MESSAGE=$(cat $FILE) | |
TICKET=$(git rev-parse --abbrev-ref HEAD | grep -Eo '^(\w+/)?(\w+[-_])?[0-9]+' | grep -Eo '(\w+[-])?[0-9]+' | tr "[:lower:]" "[:upper:]") | |
if [[ $TICKET == "" || "$MESSAGE" == "$TICKET"* ]];then | |
exit 0; | |
fi | |
echo "$MESSAGE (#$TICKET)" > $FILE |
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
type AnyFunction = (...args: any[]) => any | |
function useEvent<T extends AnyFunction>(callback?: T) { | |
const ref = useRef<AnyFunction | undefined>(() => { | |
throw new Error("Cannot call an event handler while rendering.") | |
}) | |
// Or useInsertionEffect if it's React 18 | |
useLayoutEffect(() => { | |
ref.current = callback | |
}) |
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
/* | |
This is not meant to be a final CSSWG proposal, | |
but reflects my immediate thoughts after reading | |
[David Baron's](https://github.com/dbaron/container-queries-implementability) promising draft. | |
This gist was created to demonstrate my idea for removing selectors from his query syntax. | |
More of my thoughts & notes are online at css.oddbird.net/rwd/ | |
*/ | |
main, |
This is a simple sample script for uploading a file using the file input tag of HTML. As the important point, the file is sent as the byte array for using Google Apps Script. By this, at Google Apps Script side, the byte array can be converted to a blob using a simple script.
<input id="file" type="file" onchange="saveFile(this)" />
<script>
function saveFile(f) {
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 | |
/* 1. add function to rest_api_init hook, */ | |
/* 2. then, call register_rest_route() function */ | |
add_action( 'rest_api_init', 'define_endpoint'); | |
function define_endpoint(){ | |
register_rest_route( 'namespace', '/new/route', array( | |
'methods' => array('POST','GET','UPDATE','DELETE'), | |
'callback' => 'my_awesome_func' | |
) ); | |
} |
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
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
// HTML files: try the network first, then the cache. | |
// Other files: try the cache first, then the network. | |
// Both: cache a fresh version if possible. | |
// (beware: the cache will grow and grow; there's no cleanup) | |
const cacheName = 'files'; |
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
var touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
var gesuredZone = document.getElementById('gesuredZone'); | |
gesuredZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.screenX; | |
touchstartY = event.screenY; |
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 | |
// get the count on the repeater field | |
// mabye use get_sub_field() instead of get_field() if it's nested | |
$count = count( get_sub_field( 'the_field' ) ); | |
// begin $count conditions | |
if ( $count > 1 ) { ?> | |
// greater than 1 | |
<?php the_field( 'great_than_1' ); ?> | |
<?php } else { ?> |
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
CSS: | |
.appleLinksBlack a {color: #ffffff !important; text-decoration: underline;} | |
HTML: | |
<span class="appleLinksBlack">866-787-7030</span> |
NewerOlder