Skip to content

Instantly share code, notes, and snippets.

View lookfirst's full-sized avatar
💭
25 years of paving open source roads

Public Profile lookfirst

💭
25 years of paving open source roads
View GitHub Profile
@EdOverflow
EdOverflow / github_bugbountyhunting.md
Last active April 20, 2024 01:36
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@cocoalabs
cocoalabs / gist:2fb7dc2199b0d4bf160364b8e557eb66
Created August 15, 2016 21:50
Color Terminal for bash/zsh etc..
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
@jdmaturen
jdmaturen / company-ownership.md
Last active July 29, 2023 22:39
Who pays when startup employees keep their equity?

Who pays when startup employees keep their equity?

JD Maturen, 2016/07/05, San Francisco, CA

As has been much discussed, stock options as used today are not a practical or reliable way of compensating employees of fast growing startups. With an often high strike price, a large tax burden on execution due to AMT, and a 90 day execution window after leaving the company many share options are left unexecuted.

There have been a variety of proposed modifications to how equity is distributed to address these issues for individual employees. However, there hasn't been much discussion of how these modifications will change overall ownership dynamics of startups. In this post we'll dive into the situation as it stands today where there is very near 100% equity loss when employees leave companies pre-exit and then we'll look at what would happen if there were instead a 0% loss rate.

What we'll see is that employees gain nearly 3-fold, while both founders and investors – particularly early investors – get dilute

@lexrus
lexrus / enable-von-forward-nat.sh
Created June 15, 2016 12:44
Enable VPN forward for OpenVPN on Mac OS X El Capitan
#
# https://roelant.net/2015/share-your-vpn-mac-el-capitan.html
sleep 15
#
/usr/sbin/sysctl -w net.inet.ip.fw.enable=1
/usr/sbin/sysctl -w net.inet.ip.forwarding=1
/usr/sbin/sysctl -w net.inet6.ip6.forwarding=1
pfctl -d
pfctl -f /Users/lex/Dropbox/openvpn/pf.conf -e
@dannguyen
dannguyen / README.md
Last active December 28, 2023 15:21
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data

Using Python 3 + Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs

@nlwillia
nlwillia / plugin-translate-cache.js
Last active July 28, 2016 15:14
SystemJS translate hook that caches transpilation results of sources that haven't changed in IndexedDB storage.
/**
* SystemJS translate hook that caches transpilation results of sources that haven't changed in IndexedDB storage.
* In Chrome dev tools the cache is easily managed under Resources > IndexedDB > jspm
* There's a global dependency on Dexie.js (ex: //npmcdn.com/dexie@1.3.3/dist/dexie.min.js)
* Adapted from https://gist.github.com/ineentho/3ccaaec164e418f685d7
*/
;(function(){
var db = new Dexie("jspm");
db.version(1).stores({ files: "&url,format,hash,contents" });
db.open();
@stickfigure
stickfigure / Scatter.java
Created November 10, 2015 22:43
Scatter mapping using Objectify
package com.foo.housekeeping;
import com.google.appengine.api.datastore.Entity;
import com.google.common.collect.Range;
import com.googlecode.objectify.Key;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static com.googlecode.objectify.ObjectifyService.ofy;
@iwasaki-kenta
iwasaki-kenta / TriangularArbitrage.java
Last active January 14, 2018 16:12
Triangular Arbitrage - Java Implementation
package codeit.suisse;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.apache.http.client.fluent.Request;
import org.apache.http.entity.ContentType;
import org.json.JSONObject;
@paulirish
paulirish / what-forces-layout.md
Last active April 19, 2024 14:42
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent