Skip to content

Instantly share code, notes, and snippets.

View nk-gears's full-sized avatar
💥
experimenting...

Nirmal nk-gears

💥
experimenting...
View GitHub Profile
#!/usr/bin/env bash
# Taken from (and freely modified as no license was specified):
# https://gist.github.com/ecompayment/b1054421eb90f296bbca226683c7ff7e
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
# Before running this script, you must:
# - Disable FileVault (if it is enabled) Note: You will not be able to re-enable FileVault AND keep these customisations.
# - Reboot your Mac into Recovery Mode.
# - Select Terminal from top menu and run the following commands:
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@nk-gears
nk-gears / devops.md
Created January 11, 2021 06:51
gcp devops review
@nk-gears
nk-gears / INSTALL_GOLANG_1.13.4_AMI_LINUX.md
Created October 31, 2020 06:20 — forked from riandyrn/INSTALL_GOLANG_1.13.4_AMI_LINUX.md
[Install Golang 1.13.4 on AMI Linux]

Install Golang

cd /usr/local/
sudo wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
sudo tar -xzf go1.13.4.linux-amd64.tar.gz

Append Golang Binary to Path

@nk-gears
nk-gears / remove-node-modules.md
Last active November 14, 2020 07:02 — forked from lmcneel/remove-node-modules.md
How to remove node_modules after they have been added to a repo

How to remove node_modules

  1. Create a .gitignore file in the git repository if it does not contain one

touch .gitignore

  1. Open up the .gitignore and add the following line to the file

**/node_modules

#!/bin/sh
#
# This script deploys the given manifest,
# tracks the deployment, and rolls back on failure.
#
# First execute this with "myapp.yaml" and then try it with "myapp.failing.yaml"
#
MANIFEST_PATH=$1
DEPLOYMENT_NAME=myapp
const WebSocket = require('ws');
const readline = require('readline');
const url = process.argv[2];
const ws = new WebSocket(url);
ws.on('open', () => console.log('connected'));
ws.on('message', data => console.log(`From server: ${data}`));
ws.on('close', () => {
console.log('disconnected');