Skip to content

Instantly share code, notes, and snippets.

View josepanguera's full-sized avatar
💭
Bikeshedding everything

Josep Anguera Peralta josepanguera

💭
Bikeshedding everything
View GitHub Profile
@josepanguera
josepanguera / 01_youtube_channel_uploads.php
Last active March 18, 2018 02:14
PHP: Get the uploaded videos of a channel using the YouTube API v3
<?php
$baseUrl = 'https://www.googleapis.com/youtube/v3/';
// https://developers.google.com/youtube/v3/getting-started
$apiKey = 'API_KEY';
// If you don't know the channel ID see below
$channelId = 'CHANNEL_ID';
$params = [
'id'=> $channelId,
'part'=> 'contentDetails',
@josepanguera
josepanguera / espoilertv.py
Created March 28, 2017 22:03
Espoilertv API
from datetime import datetime
from bs4 import BeautifulSoup
import requests
class Espoilertv:
BASE_URL = 'http://espoilertv.com/'
def __init__(self, email, password):
function cdb() {
USAGE="Usage: cdb [-c|-d|-l] [bookmark]" ;
DIR="$HOME/.config/cd_bookmarks"
if [ ! -e $DIR ] ; then
mkdir $DIR
fi
case $1 in
-c | --create) shift
if [ ! -f $DIR/$1 ] ; then
@josepanguera
josepanguera / purge_amis.py
Created May 19, 2020 14:09
Delete AMI's and related snapshots
import json
import boto3
from botocore.exceptions import ClientError
AMIS_FILE = "amis.json"
REFRESH_AMIS_FILE = False
DRY_RUN = True