Skip to content

Instantly share code, notes, and snippets.

View ytspar's full-sized avatar

Yury Tsukerman ytspar

View GitHub Profile
@Brandawg93
Brandawg93 / google_login.ts
Last active July 23, 2023 03:08
Login to Google Account via Puppeteer
import puppeteer from 'puppeteer-extra';
import pluginStealth from 'puppeteer-extra-plugin-stealth'; // Use v2.4.5 instead of latest
import * as readline from 'readline';
puppeteer.use(pluginStealth());
// Use '-h' arg for headful login.
const headless = !process.argv.includes('-h');
// Prompt user for email and password.
@andrewkroh
andrewkroh / beats-logstash-tls.md
Last active August 30, 2023 06:40
Using TLS between Beats and Logstash

Using TLS between Beats and Logstash

Beats to Logstash over TLS

The purpose of this document is to help with configuring and troubleshooting using TLS on the connection between Beats and Logstash.

Configuration

You must configure TLS on both the client and server to make this work. This

@timdorr
timdorr / .gitconfig
Created January 26, 2016 15:57
.gitconfig aliases
[alias]
st = status -sb
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
up = !git fetch origin && git rebase origin/master
mup = !git fetch origin && git merge origin/master
done = "!git checkout master && git pull && git fetch -p && git branch --merged | grep -Pv '\\*|master' | xargs -n 1 git branch -d"
helpers do
def dev_pages(dir)
sitemap.resources.select do |resource|
resource.path.start_with?(dir) && resource.parent == nil && resource.data.archive != true && resource.data.published != false #&& resource.metadata[:options][:layout] == 'developments'
end.sort_by { |resource| resource.data.order || 9999 }
end
end
@ferrarimarco
ferrarimarco / LatLongValidationTest.java
Last active October 28, 2023 14:25
Latitude/Longitude regex validation test. You need TestNG, Hamcrest and Lombok to run it.
import static org.hamcrest.Matchers.*;
import static org.hamcrest.MatcherAssert.*;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import lombok.extern.slf4j.Slf4j;
import org.testng.annotations.Test;
@mxlje
mxlje / ssl.md
Last active January 10, 2022 02:03
SSL Certificate Commands

These commands are needed every time you want to generate a new certificate signing request to give to an authority in order for them to generate and sign a certificate for you.

https://letsencrypt.org/ solves a lot of the pain involved with SSL certs, but sometimes you still need to go the "old school" route. I constantly forget how this stuff works, so I collected the most important commands (and what they do) here for easy copy & paste.

Generate new private key

@renatocarvalho
renatocarvalho / mailto_helper.rb
Last active May 9, 2017 03:40
Middleman email obfuscate helper
# ====================================
# Obfuscate email
# Adapted from:
# http://stackoverflow.com/questions/483212/effective-method-to-hide-email-from-spam-bots2
# Usage:
# = mailto('hi@email.com', 'Get in touch', 'btn btn--nav')
# ====================================
MAIL_TO = 'mailto:'
AT = '@'
DOT = '.'
@prabhu
prabhu / gist:509d048561db92195600
Created February 5, 2015 11:32
Iptables rule for mosh
# Mosh uses udp range 60000 - 61000. Just allow 60000 alone for added security
-A INPUT -p udp -m multiport --dports 60000:61000 -j ACCEPT
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@genadyo
genadyo / gist:295a5e8f0d743f57137f
Created November 27, 2014 17:21
app_store_app_data.json
{
"491289025" : "ijinshan-kappmarket://",
"301521403" : "fb103361823069955://",
"492178411" : "ils492178411://",
"346142396" : "fb234434003713://",
"310633997" : "whatsapp://",
"370614765" : "com.condenet.newyorker://",
"325058491" : "rnmddisco://",
"382952264" : "epichttp://",
"477048487" : "predictwind://",