Skip to content

Instantly share code, notes, and snippets.

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

Albin George albingeorge

🏠
Working from home
  • IKEA
  • Amsterdam, Netherlands
View GitHub Profile
Computer Information:
Manufacturer: LENOVO
Model: 90RC019TMH
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 7 5800 8-Core Processor
CPU Family: 0x19
CPU Model: 0x21
@albingeorge
albingeorge / README.md
Created May 20, 2023 12:27 — forked from palewire/README.md
How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

Here's how I configured a GitHub Action so that a new version issued by GitHub's release interface will build a Dockerfile, tag it with the version number and upload it to Google Artifact Registry.

Before you attempt the steps below, you need the following:

  • A GitHub repository that contains a working Dockerfile
  • The Google Cloud SDK tool gcloud installed and authenticated

Create a Workload Identity Federation

Assumptions

  • Using REST API calls

Approach 1

Request

{
  "data": {
 "name": "John",
@albingeorge
albingeorge / instant_work_log.sh
Last active March 26, 2023 20:51
Logs the input string to a dropbox directory and syncs across your devices
#!/bin/bash
# Logs the data to the dropbox directory
# Usage
# w "Created README"
# If no arguments are passed, it shows the last 20 entries
w() {
filename=~/Dropbox/tracker/$(date +%Y_%m_%d.log)
@albingeorge
albingeorge / create_order.php
Created January 18, 2016 12:01
Add an order in magento programatically
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
require_once 'app/Mage.php';
Mage::app();
$quote = Mage::getModel('sales/quote')
->setStoreId(Mage::app()->getStore('default')->getId());
@albingeorge
albingeorge / keybase.md
Created February 25, 2015 20:25
keybase.md

Keybase proof

I hereby claim:

  • I am albingeorge on github.
  • I am albin (https://keybase.io/albin) on keybase.
  • I have a public key whose fingerprint is FC08 AEB2 BB99 EADF 42EE C110 A710 C714 E5A5 02E9

To claim this, I am signing this object:

// Using native JavaScript...
function getMatches(str, regex) {
var matches = [];
var match;
if (regex.global) {
regex.lastIndex = 0;
} else {
regex = new RegExp(regex.source, 'g' +
@albingeorge
albingeorge / PHPCS pre-commit hook
Last active August 29, 2015 14:09
phpcs-pre-commit-hook
#!/bin/bash
# PHP CodeSniffer pre-commit hook for git
#
# @author Soenke Ruempler <soenke@ruempler.eu>
# @author Sebastian Kaspari <s.kaspari@googlemail.com>
#
# see the README
PHPCS_BIN=/usr/local/bin/phpcs
PHPCS_CODING_STANDARD=Zend
PHPCS_IGNORE=""
@albingeorge
albingeorge / flipkart_deal_of_the_day.py
Created September 4, 2014 04:05
Flipkart - Deal of the day
from bs4 import BeautifulSoup
import urllib
def send_email(to, subject, message):
import smtplib
gmail_user = "<user-id>@gmail.com"
gmail_pwd = "<password>"
FROM = 'albinin000@gmail.com'
TO = to
@albingeorge
albingeorge / youtube_channel_download.py
Created July 24, 2014 07:12
Download all videos from a youtube channel
import mechanize
import cookielib
from bs4 import BeautifulSoup
import re, urllib2, sys, json, os, resource
from pprint import pprint
from urlparse import urlparse, parse_qs
class Browser:
"""A browser to use to crawl the site"""