Skip to content

Instantly share code, notes, and snippets.

View brycereynolds's full-sized avatar

Bryce Reynolds brycereynolds

View GitHub Profile
@thomasloven
thomasloven / my-custom-card.js
Last active April 16, 2024 08:44
Simplest custom card
// Simplest possible custom card
// Does nothing. Doesn't look like anything
class MyCustomCard extends HTMLElement {
setConfig(config) {
// The config object contains the configuration specified by the user in ui-lovelace.yaml
// for your card.
// It will minimally contain:
// config.type = "custom:my-custom-card"
@wfaler
wfaler / xmonad.hs
Created June 26, 2018 06:30
xmonad for ultra-wide screen
import XMonad
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.DynamicLog
import Control.Monad
import qualified Data.Map as M
import Graphics.X11.Xlib
import XMonad.Prompt
@AdaRoseCannon
AdaRoseCannon / HTMLElementPlus.js
Last active March 3, 2023 11:33
HTML Element Plus for Web Components
'use strict';
class HTMLElementPlus extends HTMLElement {
static defaultAttributeValue() {
/* the name of the attribute is parsed in as a parameter */
return;
}
static parseAttributeValue(name, value) {
@veloxy
veloxy / main.js
Created March 9, 2016 11:59 — forked from nishanths/main.js
Electron tray: Drag and Drop events demo
var app = require('app');
var Menu = require('menu');
var Tray = require('tray');
var appIcon = null;
app.on('ready', function(){
// image is null, so image will not be shown in menu bar
// so click around on the system menu bar to locate the space where the tray icon is
appIcon = new Tray(null);
@sahrens
sahrens / React Native: Animated - Code
Last active July 4, 2020 00:07
Example code from ReactEurope 2015 talk - React Native: Animated
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@kacy
kacy / gist:2b9408af04c71fab686e
Last active June 16, 2020 20:22
CVE-2014-6271 fix for ubuntu bash
---
- hosts: all
user: root
sudo: true
tasks:
- name: update apt
command: apt-get update
- name: update bash
@masatomo
masatomo / gist:983a84bad9671dc29213
Last active February 28, 2018 08:49
How to use MongoDB 2.6.x on CircleCI (circle.yml)
dependencies:
cache_directories:
- mongodb-linux-x86_64-2.6.4
pre:
- if [[ ! -d mongodb-linux-x86_64-2.6.4 ]]; then wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz && tar xvzf mongodb-linux-x86_64-2.6.4.tgz; fi
- sudo /etc/init.d/mongodb stop
- sudo cp mongodb-linux-x86_64-2.6.4/bin/* /usr/bin
- sudo /etc/init.d/mongodb start