Skip to content

Instantly share code, notes, and snippets.

@Freelix
Freelix / hockeyScript.php
Created October 29, 2015 03:50
Parse NHL.com and send games scores, once a day, directly to your phone with twilio.
<?php
require "twilio-php/Services/Twilio.php";
class Match
{
public $firstTeam;
public $firstTeamScore;
public $secondTeam;
public $secondTeamScore;
}
@Freelix
Freelix / SteamGiftsScript.php
Last active August 16, 2017 03:51
Parse Steamgifts.com to automatically have a chance to win Steam games based on a games list.
<?php
// To start script --> nohup ./sg.sh >> log.txt &
// To stop script --> ps -ef
// then kill -9 pid
// Some variables
$GLOBALS['user_agent'] = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0';
$GLOBALS['main_url'] = "http://www.steamgifts.com/";
$GLOBALS['numberOfPages'] = 12;
@Freelix
Freelix / steamgifts.py
Last active August 24, 2017 03:19
Generate .exe program to parse Steamgifts.com to have a chance to win Steam games based on your wishlist
import queue
import requests
import urllib3
from bs4 import BeautifulSoup
STEAM_GIFTS_URL = "https://www.steamgifts.com/giveaways/search?type=wishlist"
USER_AGENT = "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0"
POST_URL = "https://www.steamgifts.com/ajax.php"
COOKIE = {
'PHPSESSID': 'needs to be replaced with your PHPSESSID'