Skip to content

Instantly share code, notes, and snippets.

@jaketf
jaketf / test_pandas_over_dicts.py
Created July 22, 2020 00:42
Using Pandas in an Apache Beam PTransform
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@sbrissenden
sbrissenden / retention.sql
Last active May 31, 2022 00:51
[BigQuery + Google Analytics for Firebase] Daily N-Day User Retention of September 1 Cohort
#standardSQL
####################################################################
# PART 1: Cohort of New Users starting on SEPT 1
####################################################################
WITH
new_user_cohort AS (
SELECT DISTINCT user_pseudo_id as new_user_id
FROM
`projectId.analytics_YOUR_TABLE.events_*`
WHERE
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@raulanatol
raulanatol / 01_websockets_nginx.config
Created April 12, 2016 08:27
Configure nginx to accept websockets on AWS Elastic Beanstalk
files:
"/etc/nginx/conf.d/01_websockets.conf":
mode: "000644"
owner: root
group: root
content: |
upstream nodejs {
server 127.0.0.1:8081;
keepalive 256;
}
@JanDeDobbeleer
JanDeDobbeleer / crashlytrics.rb
Last active July 15, 2018 20:54
Dashing - Crashlytics & Xaramin Insights crash free users rate widget + jobs
require 'net/https'
require 'json'
#--------------------------------------------------------------------------------
# Configuration
#--------------------------------------------------------------------------------
configuration = {
:uri => 'https://fabric.io',
:credentials => {
:username => '',
@rwestergren
rwestergren / Main.java
Last active November 1, 2020 10:30
GetAndroidSig
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.WeakReference;
import java.security.cert.CertificateEncodingException;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;
@mertsimsek
mertsimsek / besiege.sh
Last active August 29, 2015 14:17
Besiege Auto Readme Generator
git pull origin master
rm README.md
touch README.md
echo "# PREVIEWS OF VEHICLES" >> README.md
echo "## In the list below, you can see previews of vehicles that seen here." >> README.md
echo "---" >> README.md
for ext in png; do
files=( "Thumbnails/"*."$ext" )
@bencates
bencates / svgtest.html
Created June 26, 2014 04:43
Draw a SVG hexagonal grid
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>SVG Test</title>
</head>
<body>
<svg id="s" version="1.1"
width="300" height="300"
xmlns="http://www.w3.org/2000/svg">
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active June 1, 2024 14:20
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k