Skip to content

Instantly share code, notes, and snippets.

View byteshiva's full-sized avatar
🎯
Focusing

Siva byteshiva

🎯
Focusing
View GitHub Profile
@fasiha
fasiha / no-hackerrank.md
Last active August 7, 2023 11:47
A prospective employer invited me to do a HackerRank test. Here's my proposed alternative.

Well, that was unexpected. In the following, I’m trying to follow Jon Evans’ advice from “The Terrible Technical Interview”.


To: [email protected]
From: Ahmed Fasih
Subject: Re: Programming Test Invitation

Hi there! Thanks for offering to let me take a HackerRank test for ABC, I appreciate the vote of confidence.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@byteshiva
byteshiva / install_cluster_master
Last active August 25, 2016 06:28 — forked from jmcarbo/intall_cluster_master
Install cluster master node
rm -rf /tmp/install
mkdir -p /tmp/install
cd /tmp/install
apt-get update
apt-get install -y wget unzip dnsutils
wget https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip
unzip consul_0.6.4_linux_amd64.zip
install consul /usr/local/bin/consul
mkdir -p /etc/consul
mkdir -p /var/lib/consul
@byteshiva
byteshiva / install_cluster_node
Last active August 25, 2016 06:26 — forked from jmcarbo/install_cluster_node
install cluster node
rm -rf /tmp/install
mkdir -p /tmp/install
cd /tmp/install
apt-get update
apt-get install -y wget unzip dnsutils
wget https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip
unzip consul_0.6.4_linux_amd64.zip
install consul /usr/local/bin/consul
mkdir -p /etc/consul
mkdir -p /var/lib/consul
@byteshiva
byteshiva / fire_consul_event.sh
Created August 24, 2016 13:32 — forked from ianblenke/fire_consul_event.sh
Firing consul events
#!/bin/bash
consul event -name 'Name of your event' -token=$CONSUL_TOKEN 'Some payload, you should probably use JSON here'
@byteshiva
byteshiva / backup_webservice.json
Created August 24, 2016 13:11 — forked from muresan/backup_webservice.json
Backup-like feature implemented using consul. cdnhealth.json and webservice.json is on all CDN members which are not backup and backup_webservice.json is on the backup(s)
{
"services": [
{ "id": "webservice-backup",
"name": "webservice",
"tags": ["backup"],
"port": 80,
"checks": [{
"name": "DNS check ",
"script": "/usr/lib64/nagios/plugins/negate -s /usr/lib64/nagios/plugins/check_dns -H cdnhealth.service.cdn.example.com.",
"interval": "5s",

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@ishu3101
ishu3101 / gist_to_github_repo.md
Created November 24, 2015 08:35
Transfer a gist to a GitHub repository

Transfer a gist to a GitHub repository

clone the gist

git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9

rename the directory

mv 6fb35afd237e42ef25f9 ConvertTo-Markdown

change the working directory to the newly renamed directory

cd ConvertTo-Markdown

@jeffposnick
jeffposnick / index.html
Last active August 25, 2020 11:50
Exploration of how a service worker's fetch handler affects the DevTools Network panel
<html>
<head>
<title>DevTools Test</title>
</head>
<body>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
// Wait until the SW has taken control of the page before inserting the <script> elements.
// That way we can be sure the SW's fetch handler will intercept them.