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 = {};
View windows-timers.md

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
endif
" 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 https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
@amadeus
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
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
finish
endif
echom "{page} .lvimrc has been sourced"
set tabstop=2
set shiftwidth=2
set expandtab
View mvim
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app 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
View SEARCH_TODOS.md

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;
}
View README.md

Vidyas

To make an MOV an MPEG, plz to use the following command:

ffmpeg -i in.mov -f mpeg1video -vf "crop=iw-mod(iw\,2):ih-mod(ih\,2)" -vb 5000k out.mpg
You can’t perform that action at this time.