Skip to content

Instantly share code, notes, and snippets.

View sdushantha's full-sized avatar

Siddharth Dushantha sdushantha

View GitHub Profile
@fransr
fransr / customcsrf.py
Created February 16, 2021 08:30
Hackvertor Custom CSRF tag
import httplib
import urllib
http = httplib.HTTPSConnection('example.com', 443)
cookie = 'your=cookies';
http.request("GET", "/api/v1/csrf", "", {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',
'referer': 'https://example.com/',
@aaronNGi
aaronNGi / newscript.sh
Created April 28, 2020 20:38
Boilerplate for new POSIX shell scripts
#!/bin/sh
prog_name=${0##*/}
version=1.0
version_text="Boilerplate for new scripts v$version"
options="h o: q v V"
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]...
Boilerplate for new scripts
@imAliAzhar
imAliAzhar / emoji-list
Last active January 15, 2023 17:59
Create an Emoji selector menu with Rofi
<span lang="face with tears of joy"> 😂 </span>
<span lang="grinning face with smiling eyes"> 😄 </span>
<span lang="grinning face with sweat"> 😅 </span>
<span lang="face with rolling eyes"> 🙄 </span>
<span lang="smirking face"> 😏 </span>
<span lang="smiling face with halo"> 😇 </span>
<span lang="grinning face"> 😀 </span>
<span lang="squinting face with tongue"> 😝 </span>
<span lang="grinning face with big eyes"> 😃 </span>
<span lang="unamused face"> 😒 </span>
@Blaradox
Blaradox / brightnessControl.sh
Created September 23, 2018 03:47
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
@AntonFriberg
AntonFriberg / eduroam.sh
Created September 6, 2018 09:40
Connect to eduroam on Lund University with NetworkManager
nmcli con add \
type wifi \
con-name "eduroam"
ifname "wlp4s0" \ # Your wifi interface
ssid "eduroam" \
wifi-sec.key-mgmt "wpa-eap" \
802-1x.identity "<YOUR-STUDENT-ID>@lu.se" \ # May also use another university identification
802-1x.password "<YOUR-PASSWORD" \
802-1x.system-ca-certs "yes" \
802-1x.domain-suffix-match "radius.lu.se" \
@dikiaap
dikiaap / git-io-custom-url.md
Last active June 19, 2024 01:26
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
@jadeallencook
jadeallencook / instalike.js
Last active June 3, 2024 19:06
instagram autolike script
let likes = 0;
setInterval(() => {
const heart = document.querySelector('svg[aria-label="Like"][width="24"]');
const arrow = document.querySelector('svg[aria-label="Next"]');
if (heart) {
heart.parentNode.parentElement.click()
likes++;
console.log(`You've liked ${likes} post(s)`);
}
arrow.parentElement.parentElement.click();
@EdOverflow
EdOverflow / broken_link_hijacking.md
Last active May 30, 2023 18:31
This post aims to give you a basic overview of the different issues that could possibly arise if a target links to an expired endpoint.
@igniteflow
igniteflow / python-command-line.md
Last active May 13, 2018 11:48
Creating a command-line app with Python
  1. Create a setup.py:
  #!/usr/bin/env python

  from distutils.core import setup

  setup(
      name='My Thing',
 version='1.0',