I hereby claim:
- I am tibfib on github.
- I am tibfib (https://keybase.io/tibfib) on keybase.
- I have a public key whose fingerprint is 33F1 9B71 05D2 ECC0 B3E5 A343 CC4B F134 E1BA 8CCE
To claim this, I am signing this object:
// when passing functions as props and you don't care about the return value, use "unknown" | |
type Props = { | |
onUpdate: () => unknown; // Use "unknown"! | |
}; | |
function Component({onUpdate}: Props) { | |
return <button onClick={onUpdate}>update</button> | |
} | |
// With "unknown", both of these are valid! |
# OpenTeams.scpt | |
# To run automatically, see: https://apple.stackexchange.com/a/192654 | |
repeat | |
if application "Microsoft Teams" is not running then | |
tell application "Microsoft Teams" to activate | |
end if | |
delay 60 * 15 # every 15 minutes | |
end repeat |
interface IDeferredPromise<T> { | |
resolve: (T) => void, | |
reject: (T) => void, | |
promise: Promise<T>, | |
} | |
function DeferredPromise<T>(): IDeferredPromise<T> { | |
this.promise = new Promise<T>((resolve, reject) => { | |
this.resolve = resolve; | |
this.reject = reject; |
module.exports = { | |
// Fit code within this line limit | |
printWidth: 100, | |
// If true, will use single instead of double quotes | |
singleQuote: true, | |
tabWidth: 4, | |
// arrowParens: 'always', | |
// Controls the printing of trailing commas wherever possible. |
tell application "Google Chrome" | |
set found_video to false | |
set window_list to every window | |
repeat with the_window in window_list | |
if found_video is equal to true then | |
exit repeat | |
end if | |
set tab_list to every tab in the_window | |
repeat with the_tab in tab_list | |
if the title of the_tab contains "- YouTube" then |
import React, { Component } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import PropTypes from 'prop-types'; | |
import _throttle from 'lodash/throttle'; | |
let portalsRoot = document.getElementById('portals-root'); | |
const validate = value => (value !== undefined && value < 0 ? 0 : value); | |
class Popover extends Component { |
// MIT License | |
// By Will Honey at Operational Results, Inc. | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
const SUPPORTS_LOCAL_STORAGE = (function() { | |
try { | |
localStorage.setItem('a', 1); | |
localStorage.removeItem('a'); |
I hereby claim:
To claim this, I am signing this object:
enyo.kind({ | |
name: "custom.SwipeableItem", | |
kind: "onyx.SwipeableItem", | |
components: [ | |
{name: "client", kind: "Slideable", min: -100, unit: "%", ondragstart: "clientDragStart"}, | |
{name: "confirm", kind: "onyx.Toolbar", canGenerate: false, classes: "onyx-swipeable-item-confirm enyo-fit", style: "text-align: center;", ontap: "confirmTap", components: [ | |
{kind: "onyx.Button", content: "Delete", ontap: "deleteTap"}, | |
{kind: "onyx.Button", content: "Cancel", ontap: "cancelTap"}, | |
{kind: "onyx.Button", content: "HEY!", ontap: "lalala"} | |
]} |
function callSpaz(serviceParams, onFailure) { | |
var appids = ['com.funkatron.app.spaz-sped', 'com.funkatron.app.spaz', 'com.funkatron.app.spaz-beta'], index = 0; | |
function makeCall() { | |
if (index < appids.length) { | |
Mojo.Log.info('Trying to post with appid %s', appids[index]); | |
var request = new Mojo.Service.Request("palm://com.palm.applicationManager", { |