Skip to content

Instantly share code, notes, and snippets.

const [widgets, setWidgets] = React.useState<Widget[]>([]);
const [animals, setAnimals] = React.useState<Animal[]>([]);
useSyncToTable<Widget[]>({
thingToWatch: widgets,
tableName: "widgets",
debounce: 500,
});
{
"location": {
"name": "Nederland",
"region": "Colorado",
"country": "United States of America",
"lat": 39.96,
"lon": -105.5,
"tz_id": "America/Denver",
"localtime_epoch": 1608142276,
"localtime": "2020-12-16 11:11"
@glamp
glamp / clubhouse.md
Last active November 22, 2020 17:01
Bug Reporting Templates

Environment

URL: Stage: <dev/staging/qa/prod> (if applicable)

Logs

export const calculateLoadTimes = () => {
// Check performance support
if (performance === undefined) {
return [];
}
// Get a list of "resource" performance entries
const resources = performance.getEntriesByType("resource");
if (resources === undefined || resources.length <= 0) {
return [];
Packing version 98c8d04-master
Deploying to Scrapy Cloud project "373200"
Deploy log last 3 lines:
{"message": "500 Server Error: Internal Server Error for url: https://kumo-builder-prod.dc21.scrapinghub.com:2376/v1.27/auth", "error": "internal_error"}
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier()
target_variable = 'does-make-more-than-50k'
columns = ['age', 'education', 'hours-worked-per-week']
clf.fit(df[columns], df[target_variable])
@glamp
glamp / docker-compose.yml
Created April 2, 2018 17:40
Docker compose file for Wordpress.
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- dbdata:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
" Generated by Color Theme Generator at Sweyla
" http://sweyla.com/themes/seed/690000/
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
" Generated by Color Theme Generator at Sweyla
" http://sweyla.com/themes/seed/690000/
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
#!/usr/bin/env bash
# make sure the user running this script has permission to run docker
docker ps > /dev/null
# remove "<none>" images
docker rmi -f $(docker images | grep none | awk '{ print $3 }')
# cleanup exited containers
docker rm -f $(docker ps -f status=exited -q)