Skip to content

Instantly share code, notes, and snippets.

View sascha's full-sized avatar

Sascha Schwabbauer sascha

View GitHub Profile
{
"dependencies": {
"@google-cloud/functions-framework": "^3.0.0",
"@google-cloud/bigquery": "^7.8.0",
"@google-cloud/storage": "^7.11.3"
}
}
@sascha
sascha / index.js
Created July 16, 2024 14:30
Cloud Function to load Stripe Data Pipeline Paquet files from Google Cloud Storage into Google BigQuery
const functions = require('@google-cloud/functions-framework');
const { Storage } = require('@google-cloud/storage');
const { BigQuery } = require('@google-cloud/bigquery');
const path = require('path');
const PROJECT_ID = 'YOUR_GOOGLE_PROJECT_ID';
const BUCKET_NAME = 'YOUR_GCS_BUCKET_FOR_STRIPE';
const DATASET_LIVE = 'YOUR_BIGQUERY_DATASET_FOR_LIVE_DATA';
const DATASET_TEST = 'YOUR_BIGQUERY_DATASET_FOR_TEST_DATA';
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.Wai.Handler.Warp
import Network.HTTP.Types (status200)
import Blaze.ByteString.Builder (copyByteString)
import Data.Monoid
main = do
let port = 8080
package main
import (
"fmt"
"net/http"
)
const (
port = ":8080"
)
defmodule Handler do
def init(_type, req, []) do
{:ok, req, :no_state}
end
def handle(request, state) do
{ :ok, reply } = :cowboy_req.reply(
200,
[ {"content-type", "text/plain"} ],
"Hello World",
extension NSImage {
class func imageNamed(name: String, inBundle bundle: NSBundle?) -> NSImage? {
var image = NSImage(named: name)
if let image = image {
return image
}
image = bundle?.imageForResource(name)
Verifying that +sascha_ is my openname (Bitcoin username). https://onename.io/sascha_
@sascha
sascha / bump_build_number.sh
Last active September 7, 2016 06:56
Xcode build script to automatically bump the build number and convert it to hexadecimal
# This script is based on the script provided at http://stackoverflow.com/questions/9258344/xcode-better-way-of-incrementing-build-number
# The only difference is, that it uses hexadecimal build numbers instead of decimal ones.
# For instructions on how to use this script, see the link above.
#!/bin/sh
if [ $# -ne 1 ]; then
echo usage: $0 plist-file
exit 1
require [
'require',
'jquery',
'common_libs'
], (require) ->
require [
'jquery',
'use!backbone',
'app/router',
'app/views/menu/menu',
define [
'jquery'
'use!jqueryui',
'use!hoverintent',
'use!mailcheck',
'use!datepicker',
'use!ujs',
'use!validations'
], ($) ->
# do stuff