Skip to content

Instantly share code, notes, and snippets.

View henryhamon's full-sized avatar
🏠
Working from home

Henry Hamon henryhamon

🏠
Working from home
View GitHub Profile
@henryhamon
henryhamon / herokutelegrambot.py
Created October 4, 2021 10:57 — forked from liuhh02/herokutelegrambot.py
Starter python code for deploying telegram bot with heroku using the library python-telegram-bot
"""
Simple Bot to reply to Telegram messages taken from the python-telegram-bot examples.
Deployed using heroku.
Author: liuhh02 https://medium.com/@liuhh02
"""
import logging
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
import os
@henryhamon
henryhamon / custom-tinycore.sh
Created June 28, 2017 16:59 — forked from dankrause/custom-tinycore.sh
Create a custom tinycore linux iso. Adjust the config at the beginning of the script, or supply a conf as the first arg. Requires xorriso.
#!/bin/bash
set -e
function cleanup() {
# clean up our temp folder
rm -rf "${TMPDIR}"
}
trap cleanup EXIT
@henryhamon
henryhamon / c9-elixir.sh
Created May 12, 2017 19:25 — forked from padde/c9-elixir.sh
Install Script for Erlang/Elixir/Phoenix on Cloud9
#!/usr/bin/env bash
############### USAGE ###############
#
# 1. Create a new workspace on Cloud9 using the "Blank" template
#
# 2. Run this command in the console:
# bash <(curl -fsSL https://gist.githubusercontent.com/padde/3c6301f15cbd5025e131740dae33aa95/raw/c9-elixir.sh)
#
# 3. There is no step 3!
@henryhamon
henryhamon / Update remote repo
Created January 11, 2017 11:51 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
/*************************************************
* This is a simple Monte Carlo simulation to see
* whether we should
* go for X BIG deal and/or Y SMALL deals.
*
* What is the best blend?
*
* Author: Ido Green | plus.google.com/+greenido
* Date: 16 July 2013
*
require 'mechanize'
require 'hpricot'
class Orkut
def initialize(email, pass)
@agent = WWW::Mechanize.new
@email = email
@pass = pass
end

A Note

Forking has been fixed, but the old repositories will still be corrupted.

Basics

The method page will create a new page: page "home" do "Hello, world!"