This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Install mitmdump & mitmproxy with `brew install mitmproxy` | |
# run with: mitmdump -s mitm-error.py | |
# fire requests: curl --proxy localhost:8080 https://test.example.com/test | |
# set up your system proxy or configure your browser to use the proxy localhost:8080 | |
import sys | |
import re | |
import json | |
from mitmproxy import http, proxy, options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const googleapis = require('googleapis'); | |
// Setup: | |
// (Maybe it's possible to get Client ID, Client Secret, Spreadsheet ID from OAuth Playground? See the link:) | |
// https://developers.google.com/oauthplayground/ | |
// | |
// Otherwise: | |
// 1. Go to Google Cloud Platform Console > (create a project if needed) > APIs & Services > Library. | |
// Look for "Sheets" and enable the API. | |
// 2. Go to GCP Console > APIs & Services > OAuth consent screen. EDIT APP and set it to Internal, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.10/angular.min.js"></script> | |
<script src="script.js"></script> | |
</head> | |
<body ng-app="app"> | |
<app-x></app-x> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This shell script can automatically merge two Mixpanel projects. | |
# Takes events from project A and puts it in project B. | |
# Depends on: | |
# curl | |
# jq | |
# base64 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - Find Modbus library | |
# Find the Modbus headers and libraries. | |
# | |
# MODBUS_INCLUDE_DIRS - where to find modbus.h | |
# MODBUS_LIBRARIES - List of libraries when using modbus. | |
# MODBUS_FOUND - True if modbus library found. | |
# | |
# Based on Findquatlib.cmake, Original Author: | |
# 2009-2010 Ryan Pavlik <[email protected]> <[email protected]> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
~> webpack --env.numerical 5 --env.commitId 12180e3 | |
# outputs { numerical: 5, commitId: 12180000 } | |
~> webpack --env.numerical 5 --env.commitId "12180e3" [255] | |
# outputs { numerical: 5, commitId: 12180000 } | |
~> webpack --env.numerical 5 --env.commitId "12180e3" --env.TEST_STRING test [255] | |
# { numerical: 5, commitId: 12180000, TEST_STRING: 'test' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const convert = x => x.split(" ").map(e => e.split("=")[1].replace(/, /g, "")).map(e => String.fromCharCode(parseInt(e))).join(""); | |
// Usage: | |
convert("0=65, 1=66, 2=66, 3=65"); // "ABBA" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Protractor keys | |
// Extracted from https://github.com/SeleniumHQ/selenium/blob/d943ee2950e25a2f4a3492058107cfd005d6f7fd/javascript/node/selenium-webdriver/lib/input.js#L44 | |
const Key = { | |
NULL: '\uE000', | |
CANCEL: '\uE001', // ^break | |
HELP: '\uE002', | |
BACK_SPACE: '\uE003', | |
TAB: '\uE004', | |
CLEAR: '\uE005', | |
RETURN: '\uE006', |
NewerOlder