Skip to content

Instantly share code, notes, and snippets.

View archaeogeek's full-sized avatar
👋

Jo Cook archaeogeek

👋
View GitHub Profile
@archaeogeek
archaeogeek / pr.md
Created March 9, 2021 13:59 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@carolstran
carolstran / testing-pyramid-resources.md
Last active June 27, 2022 09:12
Resources from my wtfuzz video on the testing pyramid 🔼
@npearce
npearce / install-docker.md
Last active July 22, 2024 18:07
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@josegar74
josegar74 / add-schema.sh
Last active September 12, 2018 13:44
Shell script add a metadata schema in GeoNetwork for development
#!/bin/bash
function showUsage
{
echo -e "\nThis script is used to add a metadata schema in GeoNetwork for development"
echo
echo -e "Usage: ./`basename $0 $1` schema_name git_schema_repository git_schema_branch"
echo
echo -e "Example:"
echo -e "\t./`basename $0 $1` iso19115-3 https://github.com/metadata101/iso19115-3 3.4.x"
@patmigliaccio
patmigliaccio / rdp-azure.sh
Last active September 27, 2022 11:58
bash script to rdp into azure vm / windows server with freerdp
#!/bin/sh
# RDP into Azure VM / Windows machine using `xfreerdp`
#
# Reference: https://github.com/FreeRDP/FreeRDP/issues/2128#issuecomment-213505787
#
# Required dependency: http://www.freerdp.com/
#
# Preferred over `rdesktop` due to: https://github.com/rdesktop/rdesktop/issues/71
@walkermatt
walkermatt / confluence-table-to-csv.js
Last active February 21, 2018 11:42
Copy the data out of a Confluence table as CSV using Chrome devtools
function escapeAsCsv(str) {
// Double up double quotes and quote the entire string if necessary
if (str.includes(',') || str.includes('\n') || str.includes('"')) {
return '"' + str.replace(/"/g, '""') + '"';
}
return str;
}
// Export Confluence table as CSV
// Select the tbody element in Chrome devtools Elements panel then run the
@freem
freem / twitter-killjunk.js
Last active December 28, 2022 22:22
disabling extraneous twitter features
/* NOTICE: THIS WAS MADE BACK IN 2017, OF COURSE IT'S NOT GOING TO WORK WELL NOW THAT TWITTER'S FUCKED THINGS UP */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
[data-component-context="suggest_recap"],
[data-component-context="suggest_who_to_follow"],
[data-component-context="suggest_activity"],
[data-component-context="suggest_activity_tweet"],
[data-component-context="suggest_recycled_tweet_inline"],
[data-component-context="suggest_recycled_tweet"]{
@Tset-Noitamotua
Tset-Noitamotua / cucumber_to_robotframework.md
Last active May 13, 2024 11:06
HOW TO translate Cucumber test case into Robot Framework (RF) test case

Cucumber test with examples table

Scenario Outline: eating cucumbers
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |  12   |  5  |  7   |
@meets2tarun
meets2tarun / chrome.json
Created May 22, 2017 15:36
Copy the file in /etc/chromium-browser/policies/managed and make required changes in chromium-browser
// Policy template for Linux.
// Uncomment the policies you wish to activate and change their values to
// something useful for your case. The provided values are for reference only
// and do not provide meaningful defaults!
{
// Cross-origin HTTP Basic Auth prompts
//-------------------------------------------------------------------------
// Controls whether third-party sub-content on a page is allowed to pop-up an
// HTTP Basic Auth dialog box. Typically this is disabled as a phishing
// defense. If this policy is not set, this is disabled and third-party sub-
wget https://noto-website.storage.googleapis.com/pkgs/NotoColorEmoji-unhinted.zip
sudo unzip NotoColorEmoji-unhinted.zip -d /usr/share/fonts/truetype/noto
sudo rm /usr/share/fonts/truetype/noto/LICENSE_OFL.txt
sudo rm /usr/share/fonts/truetype/ancient-scripts/Symbola_hint.ttf
sudo apt-get remove ttf-ancient-fonts-symbola
sudo chmod 644 /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf
fc-cache -f -v
rm NotoColorEmoji-unhinted.zip