This file contains hidden or 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
function addStar() { | |
var s = document.createElement('div') | |
s.className = Math.random() > 0.5 ? 'star' : 'star2'; | |
var color = Math.random(); | |
s.style.backgroundColor = color > 0.6 ? '#08c6dc' : color > 0.3 ? '#fd98ab' : 'white'; | |
s.style.setProperty('--size', Math.random()*5 + 1 + 'vmin') | |
s.style.left = Math.floor(Math.random()*100) + '%' | |
s.style.top = (window.scrollY + Math.floor(Math.random()*(window.innerHeight-200))) + 'px' | |
// Make the animation duration random between 1s and 3s | |
s.style.animationDuration = Math.random() * 2 + 1 + 's'; |
This file contains hidden or 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 { detect } from 'detect-browser'; | |
import { useEffect } from 'react'; | |
let browser = detect(); | |
let supported = !!browser && browser.name !== 'ie'; | |
/** | |
* Supported versions of browsers | |
*/ | |
const supportedVersions: { [key: string]: number } = { |
This file contains hidden or 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
/* eslint-disable max-classes-per-file */ | |
declare module 'intuit-oauth' { | |
import csrf from 'csrf'; | |
interface TokenData { | |
realmId?: string; | |
token_type?: string; | |
access_token?: string; | |
refresh_token?: string; | |
expires_in: number; |
This file contains hidden or 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
#!/usr/bin/env python | |
import sys | |
import os | |
AFactor = 0.8 | |
BFactor = 0.2 | |
ALast = 0.0 | |
BLast = 0.0 | |
ELast = 0 |
This file contains hidden or 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
/** | |
* OSRAM RGBW pulse | |
* | |
* Install OSRAM RGB Device Handler FIRST! Go into "My Devices", click "Edit" and change the Device Type to "OSRAM RGBW", this seems to work on a wide range on Zigbee bulbs including Sengled. | |
* https://community.smartthings.com/t/updated-osram-lightify-rgbw-a19-br30-us-version-ha-dth/57774 | |
* | |
* | |
* Copyright 2020 Brandon Martin | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
This file contains hidden or 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 argparse | |
import matplotlib.pyplot as plt | |
from mxnet import nd, image, img | |
from mxnet.gluon.data.vision import transforms | |
from gluoncv.model_zoo import get_model | |
from gluoncv.data.transforms.presets.imagenet import transform_eval |
This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
run: docker | |
name: docker | |
namespace: gitlab-managed-apps | |
spec: | |
replicas: 1 | |
selector: |
This file contains hidden or 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
FROM php:7.1-fpm | |
MAINTAINER Brandon Martin | |
VOLUME /usr/share/nginx/www/wordpress/ | |
#WORKDIR /code | |
RUN apt-get update && apt-get install -y wget gnupg libmagickwand-dev imagemagick libzip-dev | |
RUN pecl install imagick | |
RUN pecl install zip | |
RUN docker-php-ext-install mysqli && \ | |
docker-php-ext-install pdo_mysql && \ |
This file contains hidden or 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
SET @oldsite='psd401.net'; | |
SET @newsite='lauri-dev.psd401.net'; | |
DROP PROCEDURE IF EXISTS setoptions; | |
DELIMITER $$; | |
CREATE PROCEDURE setoptions() | |
BEGIN | |
DECLARE done INT DEFAULT 0; | |
DECLARE site VARCHAR(255) DEFAULT NULL; |
This file contains hidden or 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
# Create shell script, place ffmpeg / youtube-dl / CocoaDialog in the /Applications/Utilities folder | |
loggedInUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }') | |
cd /Users/$loggedInUser/Desktop/ | |
DESKTOP="/Users/$loggedInUser/Desktop" | |
RS=`/Applications/Utilities/CocoaDialog.app/Contents/MacOS/CocoaDialog inputbox --informative-text "Youtube URL" --text "Paste Youtube URL here" --button1 "MP3" --button2 "MP4" --button3 "Close" -title "Youtube Downloader"` | |
URL=$(echo $RS | cut -c 3-) | |
ANS=$(echo $RS | cut -c 1-1) |
NewerOlder