- +1 - Take a swig
- Double or nothing - Take 2
- The magic number - Take 3
- Steady as you go - Take 4
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
// https://jsfiddle.net/7Ldmmrjd/2/ | |
span { | |
display: inline-block; | |
width: 16px; | |
height: 8px; | |
} | |
span, | |
span::before { |
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
# Disable any form of screen saver / screen blanking / power management | |
xset s off | |
xset s noblank | |
xset -dpms | |
# Allow quitting the X server with CTRL-ATL-Backspace | |
setxkbmap -option terminate:ctrl_alt_bksp | |
# Start Chromium in kiosk mode | |
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State' |
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
/* Tested with TypeScript 2.4.2 */ | |
// First we define an interface for our object | |
interface IThing { | |
id: string; | |
type: 'foo' | 'bar'; | |
num?: number; | |
} | |
// Then we can use this Exact type to prevent type inference on our objects |
- React https://www.npmjs.com/package/react
- React Syntax Highlighter https://github.com/conorhastings/react-syntax-highlighter
- React Markdown https://www.npmjs.com/package/react-markdown
- React Reorder (v3) https://www.npmjs.com/package/react-reorder
- React Set Props https://www.npmjs.com/package/@dabapps/react-set-props
- Canvasimo https://www.npmjs.com/package/canvasimo
- Slik https://www.npmjs.com/package/slik
- React Slik https://www.npmjs.com/package/react-slik
- Path https://www.npmjs.com/package/path
- Cookie https://www.npmjs.com/package/cookie
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 urllib2, time, socket | |
from datetime import datetime | |
previous_state = 'Monitoring started' | |
current_state = 'Monitoring started' | |
readable_time = None | |
time_now = None | |
disconnected_time = None | |
def start_monitoring(): |
TypeScript version: 4.2.2
tsconfig.json
{
"compilerOptions": {
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUncheckedIndexedAccess": true,
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 React, { MouseEvent, PureComponent } from 'react'; | |
interface Props { | |
onClickOutside: () => any; | |
} | |
// @TODO: element should be constrained to 'keyof ReactHTML' but this causes some crazy memory leak | |
export const withClickOutside = (element: string) => { | |
const Element = element; |
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
// Info about available characters | |
// https://mathiasbynens.be/notes/javascript-identifiers | |
// Test your variable names | |
// https://mothereff.in/js-variables | |
const ǀʋ〇ᴥ〇ǀ = 'Jake the dog'; // Needs parenthesis-like wrapper | |
const ᗡo_oᗞ = 'Monkey or Deadmau5?'; | |
const シ = 'Smile'; | |
const ㇱ = 'Small smile'; |
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
/* HTML | |
<div class="file"> | |
<div class="icon"></div> | |
<span class="filename"> | |
<span class="name"> | |
Filename<span class="extension">.ext</span> | |
</span> | |
</span> |
NewerOlder