Hi! 👋
This file contains 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
"use strict"; | |
function isExcluded(elm) { | |
if (elm.tagName == "STYLE") { | |
return true; | |
} | |
if (elm.tagName == "SCRIPT") { | |
return true; | |
} | |
if (elm.tagName == "NOSCRIPT") { |
This file contains 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
const autoJump = () => { | |
const instance = window.Runner.instance_; | |
const dino = instance.tRex; | |
const nextObstacle = instance.horizon.obstacles.filter( | |
(x) => x.xPos > dino.xPos | |
)[0]; | |
if (nextObstacle && nextObstacle.xPos - dino.xPos < 120) { | |
dino.startJump(100); |
This file contains 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 { Pipe, PipeTransform } from '@angular/core'; | |
/** | |
* Pipe to convert a string to sentence case, meaning the first letter of each **sentence** is capitalized. | |
* | |
* @example | |
* {{ 'i am a string. and me too.' | sentenceCase }} => I am a string. And me too. | |
* | |
* @example | |
* {{ 'I AM A STRING. AND ME TOO.' | sentenceCase:true }} => I am a string. And me too. |
This file contains 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
const numbers = [...Array(100000000).keys()] | |
const startTime = new Date() | |
// -- for | |
let result = 0 | |
for (let i = 0; i < numbers.length; i++) { | |
const number = numbers[i] | |
if (number % 2 === 0) { | |
result = result + number * 2 | |
} |
This file contains 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
ls -l /usr/share/vim/vim*/colors/ | |
-rw-r--r-- 1 root wheel 3274 Sep 4 2019 README.txt | |
-rw-r--r-- 1 root wheel 2476 Sep 4 2019 blue.vim | |
-rw-r--r-- 1 root wheel 2990 Sep 4 2019 darkblue.vim | |
-rw-r--r-- 1 root wheel 548 Sep 4 2019 default.vim | |
-rw-r--r-- 1 root wheel 2522 Sep 4 2019 delek.vim | |
-rw-r--r-- 1 root wheel 2812 Sep 4 2019 desert.vim | |
-rw-r--r-- 1 root wheel 1666 Sep 4 2019 elflord.vim | |
-rw-r--r-- 1 root wheel 2452 Sep 4 2019 evening.vim |
- Create a new directory inside
wp-content/styles
and name itparentthemename-child
- Create a file
style.css
using the snippet provided in this gist - If you want to append the parent theme stylesheet copy the file
functions.php
in the same directory