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
// useViewport.js | |
import { useState, useEffect } from 'react'; | |
const breakpoints = ['768px', '1024px', '1280px']; | |
const aliases = ['tablet', 'desktop', 'desktopL']; | |
const viewports = {}; | |
breakpoints.forEach((bp, i) => { | |
viewports[`(min-width: ${bp})`] = aliases[i]; | |
}); |
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
// Responsive video | |
.video-container | |
height: 0 | |
overflow: hidden | |
padding-bottom: 56.25% | |
padding-top: 35px | |
position: relative | |
iframe | |
height: 100% |
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
Node.prototype.appendChildren = function(children) { | |
const fragment = document.createDocumentFragment(); | |
Array.prototype.forEach.call(children, (child) => { | |
fragment.appendChild(child.cloneNode(true)); | |
}); | |
return this.appendChild(fragment); | |
} |
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
alias ls='ls -GFh' | |
alias ll='ls -alh' | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
# Color Code me Bro | |
RED='\[\033[31m\]' | |
GREEN='\[\033[32m\]' | |
YELLOW='\[\033[33m\]' |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ "key": "ctrl+shift+up", "command": "editor.action.moveLinesUpAction", | |
"when": "editorFocus" }, | |
{ "key": "ctrl+shift+down", "command": "editor.action.moveLinesDownAction", | |
"when": "editorFocus" }, | |
{ "key": "alt+up", "command": "editor.action.insertCursorAbove", | |
"when": "editorTextFocus" }, |
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
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
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
#!/usr/bin/env bash | |
pathName="Stremio3.5.7.linux" | |
dir="/opt/stremio" | |
echo "Installing dependencies..." | |
sudo apt-get install libappindicator1 python-gpgme libindicator7 | |
if [ ! -f ./$pathName.tar.gz ]; then | |
echo "File not found! Downloading..." |
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
<?php $output = shell_exec('git fetch --all && git reset --hard origin/master'); ?> | |
<style> | |
body{ | |
background-color: #1A1A1A; | |
color:#fff; | |
} | |
pre{ | |
padding:20px; | |
} |
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
//Fullscreen mode | |
=fullscreen() | |
&:-webkit-full-screen | |
@content | |
&:-moz-full-screen | |
@content | |
&:-ms-fullscreen | |
@content | |
&:fullscreen | |
@content |