Skip to content

Instantly share code, notes, and snippets.

Avatar

Damian yungwarlock

View GitHub Profile
@yungwarlock
yungwarlock / main.dart
Last active September 4, 2023 13:26
SchedulerBinding
View main.dart
import 'package:flutter/material.dart';
import "package:flutter/scheduler.dart";
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@yungwarlock
yungwarlock / main.dart
Last active June 26, 2023 14:24
Dart Timer
View main.dart
import 'dart:async';
void main() {
int countDown = 60;
bool shouldShowResend = false;
Timer.periodic(const Duration(seconds: 1), (t) {
print(formatTime(countDown));
print(shouldShowResend);
});
@atrauzzi
atrauzzi / google-cloud-run-get-project-hash.sh
Last active May 25, 2023 00:41
Google Cloud Run Get Project Hash
View google-cloud-run-get-project-hash.sh
#!/bin/bash
PROJECT=${1:-"$(gcloud config get-value project)"}
REGION=${2:-"us-central1"}
IMAGE="hub.docker.com/_/nginx"
{
gcloud services enable "run.googleapis.com" --project="${PROJECT}"
gcloud auth configure-docker --quiet
@coryodaniel
coryodaniel / list.txt
Created May 13, 2020 22:04
GCP List of API Services
View list.txt
NAME TITLE
abusiveexperiencereport.googleapis.com Abusive Experience Report API
acceleratedmobilepageurl.googleapis.com Accelerated Mobile Pages (AMP) URL API
accessapproval.googleapis.com Access Approval API
accesscontextmanager.googleapis.com Access Context Manager API
actions.googleapis.com Actions API
adexchangebuyer-json.googleapis.com Ad Exchange Buyer API
adexchangebuyer.googleapis.com Ad Exchange Buyer API II
adexchangeseller.googleapis.com Ad Exchange Seller API
adexperiencereport.googleapis.com Ad Experience Report API
@prokizzle
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,
FeatureFlag
} = useFeatureFlag({
Component: RecommendationsComponent,
@ycherniavskyi
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 {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@michal-wrzosek
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
lmcarreiro / .gitlab-ci.yml
Created June 11, 2018 13:36
GitLab CI .gitlab-ci.yml example
View .gitlab-ci.yml
stages:
- build
- test
- deploy
variables:
# from https://storage.googleapis.com/kubernetes-release/release/stable.txt
K8S_STABLE_VERSION_URL: https://storage.googleapis.com/kubernetes-release/release/v1.10.4/bin/linux/amd64/kubectl
build:
@tobiasraabe
tobiasraabe / python-downloader.py
Last active August 5, 2023 07:51
Script to download files, resume downloads and validate downloads. Everything wrapped with a beautiful progressbar.
View python-downloader.py
import click
import hashlib
import requests
from pathlib import Path
from tqdm import tqdm
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@nmilosev
nmilosev / edit-init-rc.md
Created May 27, 2018 21:31 — forked from ashutosh-mishra/edit-init-rc.md
How to run custom script from init.rc, How to Extract Android Kernel And Modify The Boot Ramdisk(Android 4+)
View edit-init-rc.md

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/testservice.sh

Script can contains applications start, stop commands