Skip to content

Instantly share code, notes, and snippets.

View nucab's full-sized avatar
🏠
Working from home

Noah U nucab

🏠
Working from home
View GitHub Profile
It has been a while since the last time I opened my skype. Seeing the past conversations I had with you guys was awesome. All of you have grown stronger and made your way to where you are right now. So proud. Keep it up!
jest.mock('antd', () => {
const antd = jest.requireActual('antd');
const Select = ({ children, onChange }: any) => (
<select
data-testid="entries-select"
onChange={e => onChange(e.target.value)}
>
{children}
</select>
Linking
First, in the [package] folder (where package.json is):
$ npm link
Then in the project you want to include [package] in:
$ npm link [package]
{
"include": [
"./src/*"
],
"compilerOptions": {
"lib": [
"dom",
"es2015"
],
"jsx": "react"
// 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',
chmod 777 /home/[user]/.cache
sudo apt install fish
curl -L https://get.oh-my.fish | fish
$ omf install toaster
Links:
https://medium.freecodecamp.org/automating-your-windows-subsystem-linux-setup-df4c9a7b0e7b
= Download ngrok zip
https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
= Unzip
$ unzip /path/to/ngrok.zip
= Move the file in bin folder
$ sudo mv ngrok /usr/local/bin
= Test if it is working
$ ngrok --help
$ cat /etc/wsl.conf
https://docs.microsoft.com/en-us/windows/wsl/wsl-config#set-wsl-launch-settings
https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/
# Enable extra metadata options by default
[automount]
enabled = true
root = /windir/
options = "metadata,umask=22,fmask=11"
@nucab
nucab / gist:0dc6348f1579d2fcd2c14657b16aef16
Created February 28, 2019 14:38
Disabled button is clickable on Edge browser
*[disabled] {
pointer-events: none !important;
}
@nucab
nucab / ssh_agent_start.fish
Created February 25, 2019 07:15 — forked from gerbsen/ssh_agent_start.fish
Auto-launching ssh-agent in fish shell
# content has to be in .config/fish/config.fish
# if it does not exist, create the file
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null