Skip to content

Instantly share code, notes, and snippets.

Avatar
🍵
(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)

Luke Hedger lukehedger

🍵
(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू)
View GitHub Profile
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active Oct 23, 2021
Compress mp4 using FFMPEG
View ffmpeg-compress-mp4
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@lukehedger
lukehedger / showHiddenFiles
Created Jan 6, 2014
Show hidden files on Mac OSX
View showHiddenFiles
# show
$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder
# hide
$ defaults write com.apple.finder AppleShowAllFiles FALSE
@lukehedger
lukehedger / kill-jekyll.md
Last active Aug 13, 2021
Kill Jekyll server
View kill-jekyll.md

Stopping a Jekyll server with ctrl-z can cause issues as the process is not stopped fully. To kill it:

$ lsof -wni tcp:4000
$ kill -9 <PID of process>

And next time, use crtl-c to stop.

@lukehedger
lukehedger / git-commit-signing.md
Last active Dec 14, 2020
Config for automatically signing Git commits
View git-commit-signing.md

Git Commit Signing

Windows

.gitconfig

[user]
	signingkey = <GPG_KEY_ID>
[commit]
	gpgsign = true
@lukehedger
lukehedger / browserBorder.css
Created Jan 22, 2014
Border around browser viewport - with scrollbars inside
View browserBorder.css
.page-wrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 700; /* must be the higher than all other elements */
overflow: auto; /* moves scrollbars inside border */
background: #fff;
border: 5px solid #ff9900;
View SketchSystems.spec
My Awesome Sketch
Untouched
focus -> Invalid
Invalid
blur -> Valid
Valid
View SketchSystems.spec
My Awesome Sketch
First State
some event -> Second State
Second State
@lukehedger
lukehedger / SketchSystems.spec
Last active Dec 24, 2018
Single-lever mixer tap
View SketchSystems.spec
Single-lever mixer tap
Closed*
flip lever -> Open
Open
flip lever -> Closed
Hot
turn tap -> Cold
Cold
turn tap -> Hot
@lukehedger
lukehedger / react-render-html-tags.js
Last active Oct 7, 2018
Render HTML elements defined in JSON to JSX
View react-render-html-tags.js
import React from 'react';
const Component = (props, context) => {
const { elements } = this.props;
return (
<div>
{elements.map( (element, i) => {
@lukehedger
lukehedger / HelloYou.sol
Created Nov 23, 2017 — forked from anonymous/HelloYou.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.18+commit.9cf6e910.js&optimize=undefined&gist=
View HelloYou.sol
pragma solidity ^0.4.18;
// import './SomeContract.sol';
contract HelloYou {
event Hello(address you);
function sayHello() public {
address _person = msg.sender;