Skip to content

Instantly share code, notes, and snippets.

View gvlx's full-sized avatar

Gerardo Lisboa gvlx

View GitHub Profile
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@monodot
monodot / Jenkinsfile
Created May 29, 2019 16:55
Declarative Jenkins pipeline which reads a shared library from a private Git repo
/*
Firstly, you need to add a new Credential in Jenkins to access your Git.
Grab the ID of the Credential and use it in the credentialsId field below.
*/
library identifier: 'mylibraryname@master',
//'master' refers to a valid git-ref
//'mylibraryname' can be any name
retriever: modernSCM([
$class: 'GitSCMSource',
@sdondley
sdondley / tmux split-window subcommand.md
Last active June 1, 2024 05:30
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the

-- challenge 1:
From the name of the challenge it was a dead giveway that there was a .git folder exposed.
Then just find out where the git repo is hosted:
curl http://0x70.apl3b.com/.git/config
And get the repo hosting service:
https://gitlab.com/DDuarte/twipy.git
Finally check all the commits and on this one at the bottom of the page you can read a flag:
@ireade
ireade / sw.js
Last active May 28, 2024 19:17
Handle broken images with the service worker
self.addEventListener('install', (e) => {
e.waitUntil(
caches.open("precache").then((cache) => cache.add("/broken.png"))
);
});
function isImage(fetchRequest) {
return fetchRequest.method === "GET" && fetchRequest.destination === "image";
}
@fnky
fnky / ANSI.md
Last active June 2, 2024 17:38
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active May 3, 2024 12:56
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@terabyte
terabyte / amazon.md
Created December 6, 2017 02:27
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?

@aras-p
aras-p / sysinfo.pl
Created October 27, 2017 08:43
Perl get hardware/OS data without non-standard modules
#!/usr/bin/perl
BEGIN {
if ($^O eq "MSWin32")
{
require Win32; Win32::->import();
require Win32::API; Win32::API::->import();
require Win32::TieRegistry; Win32::TieRegistry::->import();
}
}
use List::Util 'first';
@joewiz
joewiz / semver.xqm
Last active September 4, 2019 12:56
Validate, compare, sort, parse, and serialize Semantic Versioning (semver) versions, using XQuery - development has moved to https://github.com/eXist-db/semver.xq
xquery version "3.1";
(:~ Validate, compare, sort, parse, and serialize Semantic Versioning (SemVer)
: 2.0.0 version strings, using XQuery.
:
: SemVer rules are applied strictly, raising errors when version strings do
: not conform to the spec.
:
: @author Joe Wicentowski
: @version 2.1.0