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 { MyContextProvider } from './MyContextProvider; | |
import { SubComponent } from './SubComponent; | |
const Component = () => { | |
return ( | |
<MyContextProvider> | |
<SubComponent> ... </SubComponent> | |
</MyContextProvider> | |
); | |
} |
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
# Jump word back | |
option + left | |
Send escape sequence | |
b | |
# Jump word forward | |
option + right | |
Send escape sequence |
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 scrollBarStyle = ` | |
&::-webkit-scrollbar { | |
width: 8px; | |
height: 8px; | |
} | |
&::-webkit-scrollbar-track { | |
background: #f6f6f6; | |
border-radius: 8px; | |
} | |
&::-webkit-scrollbar-thumb { |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "", // UUID of an application in the list below | |
"copyOnSelect": false, | |
"copyFormatting": false, | |
"profiles": | |
{ | |
"defaults": | |
{}, |
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
#!/bin/bash | |
allowed_branches=(develop branch2 branch3) | |
is_allowed=0 | |
for i in ${!allowed_branches[@]}; | |
do | |
branch=${allowed_branches[$i]} | |
if [[ "$branch" = "$(git rev-parse --abbrev-ref HEAD)" ]] | |
then |
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
--- | |
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: mailcatcher | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: mailcatcher |
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
# This is the complete source code to Flappy Dragon: | |
# https://dragonruby.itch.io/flappydragon | |
# | |
# You can tinker with this by getting a copy of DragonRuby Game Toolkit: | |
# https://dragonruby.org/ | |
# | |
# Amir Rajan wrote this game, catch him at https://twitter.com/amirrajan ! | |
class FlappyDragon | |
attr_accessor :grid, :inputs, :game, :outputs |
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
version: '3.7' | |
services: | |
adminer: | |
image: adminer:latest | |
ports: | |
- "8080:8080" | |
postgres: | |
image: postgres:11.5 | |
environment: | |
POSTGRES_DB: MY_DATABASE |
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
// Put this whole file in __mocks__ folder as a sibling to __tests__ | |
// In the xxxx.test.js, you can do an import 'mockAxios' from 'axios' | |
const mockAxios = jest.genMockFromModule("axios"); | |
// @ts-ignore | |
mockAxios.create = jest.fn(() => mockAxios); | |
export default mockAxios; |
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
eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c.toString(a)+'\\b','g'),k[c])}}return p}('2 3=5.4("d-e");2 c=5.4("b-f-d");2 a=5.4("b-g-h");7(2 i=0;i<3.6;i++){2 1=3[i];1.9.8(1)}7(2 i=0;i<c.6;i++){2 1=3[i];1.9.8(1)}7(2 i=0;i<a.6;i++){2 1=3[i];1.9.8(1)}',19,19,'|el|var|div1|getElementsByClassName|document|length|for|removeChild|parentNode|div3|paywall|div2|modal|backdrop|hard|fixed|popup|'.split('|'))) |
NewerOlder