Skip to content

Instantly share code, notes, and snippets.


Damian yungwarlock

View GitHub Profile
atrauzzi /
Last active May 25, 2023 00:41
Google Cloud Run Get Project Hash
PROJECT=${1:-"$(gcloud config get-value project)"}
gcloud services enable "" --project="${PROJECT}"
gcloud auth configure-docker --quiet
coryodaniel / list.txt
Created May 13, 2020 22:04
GCP List of API Services
View list.txt
NAME TITLE Abusive Experience Report API Accelerated Mobile Pages (AMP) URL API Access Approval API Access Context Manager API Actions API Ad Exchange Buyer API Ad Exchange Buyer API II Ad Exchange Seller API Ad Experience Report API
prokizzle / ExampleComponent.js
Last active July 14, 2021 00:55
useFeatureFlag Example
View ExampleComponent.js
import React from 'react';
import useFeatureFlag from './useFeatureFlag';
import RecommendationsComponent from './Recommendations.js';
const {
DecoratedComponent: Recommendations,
featureEnabled: recommendationsFeatureEnabled,
} = useFeatureFlag({
Component: RecommendationsComponent,
ycherniavskyi / main.dart
Created December 28, 2019 15:25
Displaying notification badge on BottomNavigationBar's Icon
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
michal-wrzosek / api.Dockerfile
Created December 3, 2019 02:05
yarn workspaces and Docker
View api.Dockerfile
FROM node:10-alpine as build
WORKDIR /usr/src/app
COPY package.json .
COPY yarn.lock .
COPY packages/shared ./packages/shared
COPY packages/api ./packages/api
RUN yarn install --pure-lockfile --non-interactive
lmcarreiro / .gitlab-ci.yml
Created June 11, 2018 13:36
GitLab CI .gitlab-ci.yml example
View .gitlab-ci.yml
- build
- test
- deploy
# from
tobiasraabe /
Last active April 18, 2023 14:29
Script to download files, resume downloads and validate downloads. Everything wrapped with a beautiful progressbar.
import click
import hashlib
import requests
from pathlib import Path
from tqdm import tqdm
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
nmilosev /
Created May 27, 2018 21:31 — forked from ashutosh-mishra/
How to run custom script from init.rc, How to Extract Android Kernel And Modify The Boot Ramdisk(Android 4+)

init.rc changes

init.rc changes to run any script Can be used to start any android application, service

on property:dev.bootcomplete=1
    exec - system system -- /system/bin/sh <custom script path>
    # exec - system system -- /system/bin/sh /data/local/bootscript/

Script can contains applications start, stop commands

henridf /
Last active March 21, 2023 12:40
Encoding a protobuf with `protoc --encode`

I needed to quickly encode a protobuf from the command-line, and while I pretty much immediately came across protoc --encode as the obvious solution, I did not find much documentation on the input textual syntax.

Here is the relevant snippet from protoc --help:

--encode=MESSAGE_TYPE       Read a text-format message of the given type
                              from standard input and write it in binary
                              to standard output.  The message type must
                              be defined in PROTO_FILES or their imports.
nathanborror / instructions.txt
Last active May 17, 2023 00:55
Example Kubernetes setup with Postgres and two Services for serving an API and a static site using Ingress. Also have a CronJob example for kicks.
View instructions.txt
*** Cluster Setup for Google Container Engine ***
0/ Install and configure local gcloud and kubectl:
> gcloud components install kubectl
1/ Configure Google Cloud account:
> gcloud config set account YOUR_EMAIL_ADDRESS
> gcloud config set project YOUR_PROJECT_ID
> gcloud config set compute/zone us-west1-a
> gcloud config set container/cluster example