Skip to content

Instantly share code, notes, and snippets.

@timbophillips
timbophillips / Hasura Migration.md
Last active February 7, 2022 04:22
Hasura Migration

My notes on migration

Only have to do this bit the first time

hasura init data-cli --endpoint http://localhost:8081 --admin-secret hello-this-is-my-admin-secret
cd data-cli/
hasura migrate create "init" --from-server --database-name default
hasura migrate apply --skip-execution --version <version-number-from-prev-migrate-command> --database-name default
hasura metadata export

Every other time start here

import { NgModule } from '@angular/core';
import { APOLLO_OPTIONS } from 'apollo-angular';
import {
ApolloClientOptions,
InMemoryCache,
split,
ApolloLink,
} from '@apollo/client/core';
import { HttpLink } from 'apollo-angular/http';
import { WebSocketLink } from '@apollo/client/link/ws';
@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@xyznaveen
xyznaveen / samba_sharing_fix_windows10.reg
Created June 29, 2019 12:31
Even after setting up SAMBA share correctly, unable to access it on Windows 10 ( but works on Android / Ubuntu )
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:00000001
@alienlebarge
alienlebarge / README.md
Last active March 20, 2023 10:16
Setting proxy with node.js

Node.js behind a proxy

Write proxy settings

$ npm config set proxy http://localhost:3128
$ npm config set https-proxy http://localhost:3128

This config is great for SquidMan app.