Skip to content

Instantly share code, notes, and snippets.

@epaule
epaule / cufflinks2hints.pl
Last active September 27, 2015 05:08
Cufflinks FTP to Agustus hints GFF conversion (exon|intron|ep)
#!/usr/bin/env perl
#
# convert cufflinks GTF into a Augustus hintfile
#
# seq source ep|exon|intron start stop score +/- phase grp=ID; src=E
my %transcripts;
while(<>){
next unless /Cufflinks\s+exon.*transcript_id/;
@trehn
trehn / damazon.py
Last active November 22, 2016 08:47 — forked from zakx/damazon.py
#!/usr/bin/python
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
import getpass
@DavidWittman
DavidWittman / when-will-my-lenovo-arrive.sh
Last active March 21, 2017 22:13
Scrape the Lenovo order details page and print the estimated arrival date.
#!/usr/bin/env bash
# When will my Lenovo order arrive?
#
# I grew impatient while waiting for my Thinkpad to ship, and the arrival date
# kept changing, so I wrote this script to scrape their order details page.
#
# Might not work on all platforms, and it's parsing HTML with sed, so there be
# plenty of dragons within this script.
@wnoguchi
wnoguchi / README.md
Last active April 24, 2018 06:48
Preseed Recipe: Soft RAID1, LVM

Ubuntu Preseed Recipe: RAID1 + LVM

System Requirements

  • Ubuntu Server 16.04.4 LTS AMD64
  • Disk Size: 80GiB
  • Number of Disks: 2
  • LVM: YES
  • RAID: RAID1
  • Partition Table Format: MBR
@oxplot
oxplot / ether-waker.sh
Last active March 2, 2019 23:55
Wake up PCs behind the lan when SSH connection is attempted.
# Moved to https://github.com/oxplot/gists/blob/master/ether-waker.sh
require 'victor'
scale = 1000 # scale up the result by this factor
first_n = 1 # index of first logo
last_n = 10000 # index of last logo
SCALE = 0.18 # scale up the individual logos by this factor
ALPHA = -15 # for smaller values, logos will shrink faster going out. for positive values, logos will shrink going in.
def get_r i
i**(1/(2.0-ALPHA))
@Neo23x0
Neo23x0 / fp-hashes.py
Last active March 10, 2020 14:25
Typical False Positive Hashes
# This GIST has been transformed into a Git repository and does not receive updates anymore
#
# Please visit the github repo to get a current list
# https://github.com/Neo23x0/ti-falsepositives/
# Hashes that are often included in IOC lists but are false positives
HASH_WHITELIST = [
# Empty file
'd41d8cd98f00b204e9800998ecf8427e',
'da39a3ee5e6b4b0d3255bfef95601890afd80709',
#!/bin/sh
remove_dangling() {
echo "Removing dangling images ..."
docker rmi $(docker images -f dangling=true -q)
}
remove_stopped_containers() {
echo "Removing stopped containers ..."
docker rm $(docker ps -qa)
@str8edgedave
str8edgedave / macos-vbox.md
Last active December 21, 2021 21:01
Auto-starting VirtualBox VMs on MacOS High Sierra

Auto-starting VirtualBox VMs on MacOS High Sierra

Updated May 21/2018

There are lots of different how-tos out there for automatically launching VMs using VirtualBox on MacOS. Most of them focus on older versions of VirtualBox or old versions of MacOS.

Tested using MacOS High Sierra 10.13.4 running VirtualBox 5.2.12. The guest OS is Fedora 28.

Following the instructions on the VirtualBox website (https://www.virtualbox.org/manual/ch09.html#autostart), copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

david$ sudo cp \

@mpurzynski
mpurzynski / protoanomalies.rules
Created November 27, 2017 16:53
Suricata rules for protocol anomalies
alert tcp any any -> any !80 (msg:"SURICATA HTTP on unusual port"; flow:to_server; app-layer-protocol:http; threshold: type limit, track by_src, seconds 60, count 1; sid:2271001; rev:1;)
alert tcp any any -> any 80 (msg:"SURICATA non-HTTP on TCP port 80"; flow:to_server; app-layer-protocol:!http; threshold: type limit, track by_src, seconds 60, count 1; sid:2271002; rev:1;)
alert tcp any any -> any ![443,465,587] (msg:"SURICATA TLS on unusual port"; flow:to_server; app-layer-protocol:tls; threshold: type limit, track by_src, seconds 60, count 1; sid:2271004; rev:1;)
alert tcp any any -> any [443,465] (msg:"SURICATA non-TLS on TLS port"; flow:to_server; app-layer-protocol:!tls; threshold: type limit, track by_src, seconds 60, count 1; sid:2271003; rev:1;)
alert tcp any any -> any ![20,21] (msg:"SURICATA FTP on unusual TCP port"; flow:to_server; app-layer-protocol:ftp; threshold: type limit, track by_src, seconds 60, count 1; sid:2271005; rev:1;)
alert tcp any any -> any [20,21] (msg:"SURICATA non-FTP on TCP