Skip to content

Instantly share code, notes, and snippets.


Amadeus Demarzi amadeus

Block or report user

Report or block amadeus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View import-export.js
// Default export
// Export from file.js
const ExampleSomething = {};
export default ExampleSomething;
// import from another.js
import ExampleSomething from './file.js';
// Named Exports
// Export from file.js
export const Another = {};

Fixing Windows Wake Timers

  • Download psexec
  • From Command Prompt in administrator mode (right click from search launcher)
  • Useful link Windows Timers Bullshits
  • To view current powercfg -waketimers
  • psexec.exe -i -s %windir%\system32\mmc.exe /s taskschd.msc
    • Brings up a funky UI to fix some waketimers
    • Event Viewer (Local) -> Windows Logs -> System (Right click -> Filter Current Log) -> Event sources: Power-Troubleshooter -> Ok
View example.vimrc
" Base .vimrc file
if has('vim_starting')
set nocompatible
" Ensure all directories are setup properly and download plug.vim
if empty(glob('~/.vim/autoload/plug.vim'))
execute '!mkdir -p ~/.vim/bundle ~/.vim/backup ~/.vim/swap ~/.vim/cache ~/.vim/undo ~/.vim/autoload ~/.vim/bundle'
execute '!curl -fLo ~/.vim/autoload/plug.vim'
amadeus / prettier.json
Created Jan 1, 2019
.prettierrc template
View prettier.json
"printWidth": 120,
"trailingComma": "es5",
"bracketSpacing": false,
"singleQuote": true,
"jsxBracketSameLine": true,
"overrides": [
"files": ["*.css", "*.styl"],
"options": {
amadeus / lvimrc.vim
Created Jan 1, 2019
.lvimrc template
View lvimrc.vim
" NOTE: Only source this file once per session
if g:localvimrc_sourced_once
echom "{page} .lvimrc has been sourced"
set tabstop=2
set shiftwidth=2
set expandtab
View mvim
# This shell script passes all its arguments to the binary inside the
# application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
View vimrc.vim
let g:hl_was_on = 0
function! ToggleHLSearch(enter)
if a:enter == 1 && v:hlsearch == 1
let g:hl_was_on = 1
elseif a:enter == 1
let g:hl_was_on = 0
set hlsearch
elseif a:enter == 0 && g:hl_was_on == 0
let g:hl_was_on = 0
set nohlsearch
amadeus / gist:983364
Created May 20, 2011
Penner's easing methods in CSS
View gist:983364
'linear:in': cubic-bezier(0,0,1,1)
'linear:out': cubic-bezier(0,0,1,1)
'linear:in:out': cubic-bezier(0,0,1,1)
'expo:in': cubic-bezier(0.71,0.01,0.83,0)
'expo:out': cubic-bezier(0.14,1,0.32,0.99)
'expo:in:out': cubic-bezier(0.85,0,0.15,1)
'circ:in': cubic-bezier(0.34,0,0.96,0.23)
'circ:out': cubic-bezier(0,0.5,0.37,0.98)
'circ:in:out': cubic-bezier(0.88,0.1,0.12,0.9)
'sine:in': cubic-bezier(0.22,0.04,0.36,0)

Search TODOs

Quickly off the top of my head, these are the things that could use improvement. There are probably things I am forgetting and feedback from internal people as well that I am forgetting or has yet to be mentioned to me.

Jake Priority

  • AB Testing requirements
  • Backend support for
    • has:link
View flowTests.js
function bar(x: string, y: number): string {
return x.length * y;
type PermissionOverwrite = {
id: string;
type: 'role' | 'member',
allow: number;
deny: number;
You can’t perform that action at this time.