Skip to content

Instantly share code, notes, and snippets.

@lpetre
lpetre / convert_data_provider_to_parameterized.py
Created January 7, 2022 15:38
Codemod for converting libcst.testing.utils.data_provider to parameterized.expand
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
import argparse
import ast
from typing import Generator, List, Optional, Sequence, Set, Tuple
import libcst as cst
require 'fileutils'
require 'sqlite3'
require 'uri'
require 'net/http'
require 'set'
require 'thread'
domain_set = Set.new
cloudflare_set = Set.new
query_uris = Array.new
@lpetre
lpetre / newrelic.go
Created May 11, 2016 11:53
Script to cleanup ec2 instances from newrelic
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"sort"
"strings"

Keybase proof

I hereby claim:

  • I am lpetre on github.
  • I am lpetre (https://keybase.io/lpetre) on keybase.
  • I have a public key whose fingerprint is E8F9 7A41 4EC3 BA77 7666 3454 5A89 4A3E E415 0246

To claim this, I am signing this object:

In Google Developer Console inside your app project, on the Credentials section, you must create a new "Service Account" "Client ID", if you have not already. And download the JSON file.

On Google Play Developer Console you have to give permissions to "YOUR_SERVICE_ACCOUNT_EMAIL@developer.gserviceaccount.com" for uploading apks.

Installation

Download Google APIs Client Library for Python (google-api-python-client): https://code.google.com/p/google-api-python-client/ or use pip:

  $ pip install google-api-python-client
@lpetre
lpetre / haxe.rb
Last active August 29, 2015 14:00
require 'formula'
class Haxe < Formula
homepage 'http://haxe.org'
head 'https://github.com/proletariatgames/haxe.git', :branch => 'master'
depends_on 'neko' => :recommended
depends_on 'objective-caml' => :build
depends_on 'camlp4' => :build
@lpetre
lpetre / unity-cache.rb
Last active December 29, 2015 13:48
homebrew recipe for the unity cache server
require 'formula'
class UnityCache < Formula
homepage 'http://unity3d.com/unity/collaboration/'
url 'http://netstorage.unity3d.com/unity/CacheServer-4.5.5.zip'
sha1 'e56e288550dc48cfeaebcf9bba5f07ae566e1747'
depends_on 'node'
def install