Skip to content

Instantly share code, notes, and snippets.

View alanxone's full-sized avatar
🎯
Focusing

Alan alanxone

🎯
Focusing
View GitHub Profile
@cyrildiagne
cyrildiagne / setup_knative_gcp.sh
Last active July 4, 2023 05:08
Setup Knative Cluster with GPU on GKE
#!/bin/bash
# Requires gcloud and kubectl.
# Make sure you've enabled the API services using gcloud:
# gcloud services enable \
# cloudapis.googleapis.com \
# container.googleapis.com \
# containerregistry.googleapis.com
# Exit on error.
@zcaceres
zcaceres / mealpal.json
Created May 6, 2018 02:04
mealpal-json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@asukakenji
asukakenji / 0-go-os-arch.md
Last active June 8, 2024 22:33
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@ocombe
ocombe / translateUniversalLoader.ts
Last active May 11, 2023 07:01
ng2-translate file loader for Angular Universal (server side)
import {TranslateLoader} from "ng2-translate/ng2-translate";
import {Observable} from "rxjs/Observable";
import fs = require('fs');
export class TranslateUniversalLoader implements TranslateLoader {
constructor(private prefix: string = 'i18n', private suffix: string = '.json') {}
/**
* Gets the translations from the server
* @param lang
@artem-zinnatullin
artem-zinnatullin / MyApp.java
Last active January 15, 2023 13:04
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}