Skip to content

Instantly share code, notes, and snippets.

View daroczig's full-sized avatar

Gergely Daróczi daroczig

View GitHub Profile
@domenic
domenic / redirecting-github-pages.md
Created February 10, 2017 19:28
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution

@atajti
atajti / csalasdetektalas.R
Created March 29, 2017 13:48
Csalásdetektálás az Andego-nál | BURN meetup 2017.03.29.
#-------------------------------------------------------------------#
### Csalásdetektálás - gépjárműbiztosítás ###########################
### BURN meetup 2017.03.29 ###########################
#-------------------------------------------------------------------#
# szükséges csomagok:
# data.table
# stringr
# igraph
@jimhester
jimhester / ternary.R
Last active November 9, 2021 19:17
Ternary operator in R
``` r
`?` <- function(x, y) {
y <- substitute(y)
if (!is.call(y) || !identical(as.symbol(":"), y[[1]])) stop("Invalid", call. = FALSE)
eval(call("if", x, y[[2]], y[[3]]))
}
T ? 1
#> Error: Invalid
@nfultz
nfultz / docker-wildcard.md
Created June 19, 2017 20:38
Comments on working around .git folder in docker.
@peterfoley
peterfoley / optimal_piechart.md
Last active August 23, 2017 23:36
optimal pie chart
library(tidyverse)
## Loading tidyverse: ggplot2
## Loading tidyverse: tibble
## Loading tidyverse: tidyr
## Loading tidyverse: readr
@bojand
bojand / index.md
Last active June 17, 2025 06:01
gRPC and Load Balancing

Just documenting docs, articles, and discussion related to gRPC and load balancing.

https://github.com/grpc/grpc/blob/master/doc/load-balancing.md

Seems gRPC prefers thin client-side load balancing where a client gets a list of connected clients and a load balancing policy from a "load balancer" and then performs client-side load balancing based on the information. However, this could be useful for traditional load banaling approaches in clound deployments.

https://groups.google.com/forum/#!topic/grpc-io/8s7UHY_Q1po

gRPC "works" in AWS. That is, you can run gRPC services on EC2 nodes and have them connect to other nodes, and everything is fine. If you are using AWS for easy access to hardware then all is fine. What doesn't work is ELB (aka CLB), and ALBs. Neither of these support HTTP/2 (h2c) in a way that gRPC needs.

@jflasher
jflasher / details.md
Created February 23, 2018 14:56
Accessing data older than 90 days from OpenAQ

Currently, only data within the last 90 days is available via the OpenAQ API. However, there is much more data available on OpenAQ and a variety of different access mechanisms. Note also that there is work under way to bring back to the API a mechanism to access the data older than 90 days, details here.

If you're looking to query across all the data or even easily export the data (or a subset of it), the easiest way to do that currently is using a service like Amazon Athena. I'll provide some directions on how to do that below, but at a high level, this will let you make any query of the entire dataset that you'd like (written in SQL). I'll also provide some sample queries so you can see what's possible.

On to the directions!

  1. You will need to create an AWS account if you don't currently have one, you can start this process at htt
\documentclass[15pt]{scrartcl}
\usepackage[a6paper,left=1cm,right=1cm,top=2cm,bottom=1cm,heightrounded]{geometry}
\usepackage[svgnames]{xcolor}
\usepackage{pdflscape}
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{wallpaper}
\usepackage[normalem]{ulem}
@mbleigh
mbleigh / README.md
Last active September 25, 2020 04:26
Automate the deletion of old Firebase Hosting versions.

Firebase Hosting Version Cleanup

This is a simple utility script for cleaning up Firebase Hosting versions, leaving a specified number of versions remaining. This is primarily done to conserve storage usage, but may have other uses.

USE AT YOUR OWN RISK. NO WARRANTY IS PROVIDED. THIS SCRIPT DOES DELETE STUFF PERMANENTLY

Usage

node cleanupVersions.js [commit]

@pesterhazy
pesterhazy / lambda-edge-spa.js
Created September 26, 2018 14:56
Lambda@Edge trigger: simple URL rewriting
"use strict";
// Lambda@Edge trigger to serve index.html when the
// user requests /app/*; use in Cloudfront as a viewer-request
// event
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
if (/^\/app($|\/)/.test(request.uri) || request.uri == "/") {
request.uri = "index.html";