Skip to content

Instantly share code, notes, and snippets.

View inadarei's full-sized avatar

Irakli Nadareishvili inadarei

View GitHub Profile
@inadarei
inadarei / globalprotect.md
Last active June 24, 2018 15:21
Stop and Start Palo Alto GlobalProtect
#!/bin/bash
echo "Stopping GlobalProtect..." 
launchctl remove com.paloaltonetworks.gp.pangps 
launchctl remove com.paloaltonetworks.gp.pangpa 
echo "Done!"
@inadarei
inadarei / http.md
Created October 17, 2016 03:34
HTTP 1.1 Latest RFCs
  1. RFC7230 Message Syntax and Routing
  2. RFC7231 Semantics & Content - methods, status codes and headers
  3. RFC7232 Conditional Requests - e.g., If-Modified-Since
  4. RFC7233 Range Requests - getting partial content
  5. RFC7234 Caching - browser and intermediary caches
  6. RFC7235 Authentication - a framework for HTTP authentication
const a = [1,2,3,4,5];
const aCloned = [...a];
aCloned.push(7);
console.log(a);
console.log(aCloned);
const o = { name: "john", lastname: "nelson", skills: "python" };
const oCloned = { ...o };
@inadarei
inadarei / ultimate-ut-cheat-sheet.md
Created November 30, 2017 15:33 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@inadarei
inadarei / .bash_profile
Last active March 4, 2017 15:58
Bash Profile Script for Guaranteed Docker Machine Activation
# Make sure that ur #docker host is active & ready to go, in every shell, no matter what:
export DOCKER_MACHINE_ACTIVE="your-docker-machine-name"
export DOCKER_MACHINE_ACTIVE_STATUS=`docker-machine ls | grep -i "$DOCKER_MACHINE_ACTIVE" | grep "Running" | awk '{ print $2}'`
if [ "$DOCKER_MACHINE_ACTIVE_STATUS" != "*" ]; then
if [ "$DOCKER_MACHINE_ACTIVE_STATUS" != "-" ]; then
echo "Docker machine $DOCKER_MACHINE_ACTIVE not running. Starting…"
docker-machine start $DOCKER_MACHINE_ACTIVE
sleep 3s
eval "$(docker-machine env $DOCKER_MACHINE_ACTIVE)"
@inadarei
inadarei / copyright.md
Last active January 1, 2016 13:09
Sandra Day O'Connor On Copyright
@inadarei
inadarei / view.md
Last active December 31, 2015 09:59 — forked from mstade/view.md
/foo should be requested as Javascript. Most probably just a typo in the original.

Application views using HTTP trickery

If the client makes a request, let's say this is an initial request to a resource that the client knows nothing about. It goes along and does a little something like this:

GET /foo HTTP/1.1
Accept: text/html
@inadarei
inadarei / osxstartup.md
Last active December 26, 2015 13:49
Ways something can start on OS-X
  1. System Preferences -> {Account} -> Login Items
  2. ~/Library/LaunchAgents
  3. /System/Library/LaunchAgents
  4. /System/Library/LaunchDaemons
  5. ~/.profile or ~/.bash_profile
@inadarei
inadarei / testrequest.js
Created August 1, 2013 20:27
Node.js compounding http request latency problem
/**
Some relevant links along the way:
https://github.com/joyent/node/issues/2809
https://github.com/joyent/node/issues/877
**/
var http = require('http');
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no