Skip to content

Instantly share code, notes, and snippets.

@Wikinaut
Wikinaut / breaking-news.sh
Created February 1, 2021 19:51
Breaking-News-Generator
#!/bin/bash
# Imagegenerator for "Breaking News"
# Init 20210112
if [[ $# -ne 3 ]] ; then
echo "Usage:"
echo "breaking-news imagefile \"headline-text\" \"yellow-ribbon-text\""
exit
fi
@dideler
dideler / bot.rb
Last active May 17, 2024 15:33
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@fm3
fm3 / firefox-tab-wheel-scroll.ahk
Last active December 2, 2017 23:28
Firefox: Tab Wheel Scroll using AutoHotkey for Windows
#MaxHotkeysPerInterval 200
shouldFire()
{
CoordMode, Mouse, Screen
MouseGetPos, mouseX, mouseY, MouseHoverWin
WinGetPos, winX, winY, width, height, ahk_id %MouseHoverWin%
WinGetClass, class, ahk_id %MouseHoverWin%
if (mouseY - winY >= 0 && mouseY - winY < 40 && class == "MozillaWindowClass") {
return 1
}
@EdOverflow
EdOverflow / github_bugbountyhunting.md
Last active April 29, 2024 14: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
@boformer
boformer / BuildingDataManager.cs
Last active January 18, 2023 22:17
How to load and save data with Cities Skylines' Mod API and Colossal Order's Serialization API
using System.IO;
using ColossalFramework.IO;
using ICities;
using UnityEngine;
/// <summary>
/// A simple example how to save custom data in savegames.
/// This uses 3 components:
///
/// 1. SerializableDataExtensionBase
@jonlundy
jonlundy / conv.py
Last active February 15, 2024 00:12
#!/usr/bin/python
# SPDX-License-Identifier: MIT
import sys,json,base64,binascii
with open(sys.argv[1]) as fp:
pkey=json.load(fp)
def enc(data):
missing_padding = 4 - len(data) % 4
if missing_padding:
@krmaxwell
krmaxwell / notes.md
Last active August 31, 2016 11:51
Installing jekyll fresh on Ubuntu 14.04.1 LTS
@nackjicholson
nackjicholson / unit-test-angularjs-grunt-karma-travis.md
Created December 22, 2014 05:37
Unit Testing with AngularJs, Grunt, Karma, and TravisCI

If you've done much reading about angularjs you've no doubt come across mention of karma, a test runner recommended especially for use with angularjs applications. The [angular-seed][1] project is a great way to get started with the basics of angular testing using karma, but for projects of any significant size you will soon hit the cieling in terms of organizational complexity. What I want to share in this article is the approach I have taken using [Grunt][2] and the [grunt-karma][3] plugin to sustainably manage my projects' client side unit tests and run them via [TravisCI][4]. I plan to write another entry about how to approach the actual minutia of unit testing angular code in the near future.

Karma, configuration for tests

Karma is really nothing more than a set of centralized configuration that builds a test runner for you. The advantage being that it allows you to easily execute tests in a headless browser, and output to the command line. As someone who has actually set all of that up from scratc

@killercup
killercup / api.js
Last active June 10, 2021 22:02
Streamed CSV Export using node-restify and mongoose
/**
* # Some Demo API Service
*/
var restify = require('restify');
var map = require('map-stream');
var csvify = require('../helpers/csvify');
var Team = require("../models").Team;
@spion
spion / screenshot.js
Last active May 27, 2022 01:38
Take website screenshots of any resolution using phantomjs
// Usage: phantomjs screenshot.js 1920x1080 site.domain.com
// outputs to site.domain.com-1920x1080.png
// dont add http to the URL
// If the page didnt render in time add a delay argument
// e.g. 3000 for 3 seconds
var page = require('webpage').create();
var args = require('system').args;
var wh = args[1].split('x');