Skip to content

Instantly share code, notes, and snippets.

View bilabar's full-sized avatar
🌴
On vacation

Bilabar bilabar

🌴
On vacation
View GitHub Profile
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active July 4, 2024 13:50
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@cobaltgit
cobaltgit / README.md
Last active January 26, 2024 20:03
A Guide to Discord Bot Hosting

Cobalt's Guide to Discord Bot Hosting

Here is a guide to help you what Discord bot host to pick. This was originally a tag on the discord.py server, but was moved to this GitHub gist as it eventually rolled over the 2000 character limit.

VPS Hosting (best)

I recommend a cheap VPS server as the best way to host your bot online for 24/7. Here are some good picks, credit to the discord.py server for this

Scaleway - EU
Linode - EU/US/Asia

@imneonizer
imneonizer / how-to-download-from-pan-baidu.md
Created October 28, 2021 08:59
How to download from pan.baidu without account

How to download from pan.baidu.com

Disclaimer:

  • This methods uses a 3rd party website: https://baidu.kinh.cc/.
  • I don't know chinese and after one day of searching for a method I finally found this. I don't know how safe this website is but it does the job.
  • Do it on your own responsibility. I have no idea about possible copyright (if there is such a thing in China) and other stuff regarding to this.

Steps

1. Open the website mentioned above and fill out fields as following:

@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@apisandipas
apisandipas / De-quarantine an app on MacOS
Last active June 7, 2024 00:58
De-quarantine an app on MacOS
codesign --sign - --force --deep /Applications/VSCodium.app
xattr -d com.apple.quarantine /Applications/VSCodium.app
@BitTheByte
BitTheByte / burpcert.sh
Created September 28, 2020 08:00
Generate custom CA certificate for burp to work with Android
# mkdir certificates && cd certificates
sudo apt-get install openssl
cp /usr/lib/ssl/openssl.cnf ./
openssl req -x509 -days 730 -nodes -newkey rsa:2048 -outform der -keyout server.key -out ca.der -extensions v3_ca -config openssl.cnf
openssl rsa -in server.key -inform pem -out server.key.der -outform der
openssl pkcs8 -topk8 -in server.key.der -inform der -out server.key.pkcs8.der -outform der -nocrypt
rm openssl.cnf
rm server.key
rm server.key.der
@vegard
vegard / kernel-dev.md
Last active July 19, 2024 19:07
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

Abstract: This article discuss several approaches to install an Official Chrome OS on a non-chrome device by installing and modifying a Chromium OS installation with an Intel CPU. The main goal is to transform a ChromiumOS distribution into an Official Chrome OS distribution so it can run on a non-chrome device. The most obvious benefit of running an Official Chrome OS is that it supports Google Play.

Crucial steps

Before you do anything else you've to check the compability of the machine that you want to install an Official Chrome OS into. Google your CPU model and find out the codename for your specific CPU microarchitecture, e.g. many Intel laptops from 2015 make use of a CPU with a Broadwell architecture and many laptops from 2016-2017 make use of the Skylake architecture. But you need to know what architecture your specific machine have.

On