Skip to content

Instantly share code, notes, and snippets.

View michealespinola's full-sized avatar
:octocat:

Micheal Espinola michealespinola

:octocat:
  • Las Vegas, NV
  • 20:50 (UTC -07:00)
View GitHub Profile
@pdl
pdl / pl2py.pl
Created October 23, 2012 14:28
Convert perl scripts to python with the awesome power of regular expressions.
#!perl -w
=head1 NAME
pl2py.pl
=head1 DESCRIPTION
Attempts to convert perl scripts to python with the awesome power of regular expressions.
@mhawksey
mhawksey / gist:5705633
Created June 4, 2013 12:48
Google Apps Script to send emails when an new Google Site Announcement is made (In response to https://plus.google.com/109310290306060614500/posts/JYMPQ2mLuEt )
/*
1. Set two variables below
2. Run > setup (twice, once to authenticate the script, second to actually run
3. Rescources > Current project trigger's and then click 'No triggers set up. Click here to add one now.'
You can accept the defaults to run emailAnnouncements() every hour
*/
var url_of_announcements_page = "https://sites.google.com/site/appsscripttemplates/home/announcetest"; // where your site page is
var who_to_email = "youremail@example.com" // who to send to (it can be a comma seperated list)
@jceresearch
jceresearch / gist:5755030
Last active July 6, 2020 06:51
Google Apps Script to create a digest from a set of messages in Gmail. It does a bit more than that, filters by time, strips the html, trims legalese (or whatever) and tags messages so they are not processed again. Ideal to schedule it in gmail.
function GenerateDigest() {
//Function that goes through a search query based on time and optional label in gmail, strips html, collates into a single email, sends it to a desired address and then labels the emails as processed.
// Where the digest email is going
var to_emailAddress = "tomail@somedomain.com";
//We calculate the 24 hour range, I plan to run this every day at 9:00 to get last 24 hours of emails
var month = new Date().getMonth();
@danfinlay
danfinlay / How to download streaming video.md
Last active June 29, 2024 04:41
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@skylord123
skylord123 / completed.py
Created July 17, 2014 16:27
deluged, filebot, and plex integration
#!/usr/bin/python
import sys
import subprocess
import logging
from os import path
from deluge.ui.client import client
from twisted.internet import reactor
# Customizable filebot and script options. Lines starting with # are disbled. Remove # to enable them.
@alexwilson
alexwilson / cloudflare-challenge.js
Last active September 3, 2021 17:23
This is a project designed to get around sites using Cloudflare's "I'm under attack" mode. Using the PhantomJS headless browser, it queries a site given to it as the second parameter, waits six seconds and returns the cookies required to continue using this site. With this, it is possible to automate scrapers or spiders that would otherwise be t…
/**
* This is a project designed to get around sites using Cloudflare's "I'm under attack" mode.
* Using the PhantomJS headless browser, it queries a site given to it as the second parameter,
* waits six seconds and returns the cookies required to continue using this site. With this,
* it is possible to automate scrapers or spiders that would otherwise be thwarted by Cloudflare's
* anti-bot protection.
*
* To run this: phantomjs cloudflare-challenge.js http://www.example.org/
*
* Copyright © 2015 by Alex Wilson <antoligy@antoligy.com>
@georgy7
georgy7 / extract_mbox_attachments.py
Last active June 6, 2024 22:08
Extract attachments from mbox file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Modified.
# Original script source:
# http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# https://web.archive.org/web/20150312172727/http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# Usage:
# Run the script from a folder with file "all.mbox"
@axe312ger
axe312ger / filebot.md
Last active November 3, 2016 09:28
mp3tag and filebot renaming

filebot

\PATH\TO\YOUR\MOVIE\LIBRARY\{if (ext == 'jpg' || ext == 'jpeg') "_trash-us/$fn/"}{n} ({y}){' - '+source}{if (Integer.parseInt(vf.substring(0, vf.length()-1)) > 720) bene_quali = " - 1080p" else {if(Integer.parseInt(vf.substring(0, vf.length()-1)) > 480) bene_quali = " - 720p" else bene_quali = " - "+sdhd}}/{n} ({y}){' - '+audio.language.replaceAll(/\//, "+")}{' - '+source}{" - CD$pi"} [{"${fn.match(/3D/)}, "}{vc}{', '+vf}{', '+ac}{', '+af}{', '+file.toString().match(/\.ld\.|\.md\.|dubbed/).toUpperCase().replaceAll(/\./,'')}]
@Two9A
Two9A / decronym.php
Last active April 9, 2024 23:25
Decronym: A simple Reddit bot
<?php
/**
* Dirty, dirty Reddit bot: Decronym
*/
class Reddit {
const USERNAME = 'Decronym';
const PASSWORD = '***';
const CLIENTID = '***';
const SECRET = '***';
@Zenexer
Zenexer / Disable Windows Annoyances.md
Last active May 15, 2024 14:23
Permanently disable Windows Defender and other annoyances in Windows.

Instructions

  • To disable a service, download Disable<Service>.reg and double-click to import. (Replace <Service> with the name of the service you want to disable.)
  • To re-enable a service, download Enable<Service>.reg and double-click to import. (Replace <Service> with the name of the service you want to enable.)

Note that if you save the files by copying them into a text editor, they may need to be saved with Windows-style line endings (\r\n).

Services