Skip to content

Instantly share code, notes, and snippets.

View anhtuank7c's full-sized avatar

Tuan Nguyen anhtuank7c

View GitHub Profile
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active April 29, 2025 08:30
Byte formatting for Google Sheets
@leesc22
leesc22 / MainActivity.kt
Created July 5, 2018 06:21
Android TextToSpeech in Kotlin
package com.example.android.texttospeech
import android.os.Build
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.speech.tts.TextToSpeech
import android.util.Log
import kotlinx.android.synthetic.main.activity_main.*
import java.util.*
@CodingDoug
CodingDoug / README.md
Last active November 6, 2022 09:29
Example code from the video "Use async/await with TypeScript in Cloud Functions"

Example code from the video "Use async/await with TypeScript in Cloud Functions"

This is the example code from my video about using async/await with Cloud Functions. I've placed it here in a gist so it's easier to compare the "before" and "after" states for each case.

Watch the video here

The code in this project is licensed under the Apache License 2.0.

Copyright 2018 Google LLC
@mrbar42
mrbar42 / README.md
Last active March 14, 2025 21:14
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@dideler
dideler / bot.rb
Last active May 13, 2025 09:16
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
# When using RN in combination with Cocoapods, a lot of
# things are broken. These are the fixes we had to append
# to our Podfile when upgrading to [email protected].
#
# WARNING: Check those line numbers when you're on a different version!
def change_lines_in_file(file_path, &change)
print "Fixing #{file_path}...\n"
contents = []
@EmmanuelGuther
EmmanuelGuther / BadgeTabLayout.kt
Last active December 14, 2022 03:08
Add badge to tab layout
package es.cityride.mantapp
import android.content.Context
import android.graphics.PorterDuff
import android.graphics.drawable.Drawable
import android.support.design.widget.TabLayout
import android.util.AttributeSet
import android.util.SparseArray
import android.view.LayoutInflater
import android.view.View
@ibraheem4
ibraheem4 / postgres-brew.md
Last active April 19, 2025 14:27 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@asiatact
asiatact / smscode
Last active October 21, 2017 15:09
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
@ericksli
ericksli / ReactNativeExtensions.kt
Last active March 8, 2025 03:37
React Native Kotlin extension functions for creating WritableMap and WritableArray #android #react-native #kotlin
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableArray
import com.facebook.react.bridge.WritableMap
fun writableMapOf(vararg values: Pair<String, *>): WritableMap {
val map = Arguments.createMap()
for ((key, value) in values) {
when (value) {
null -> map.putNull(key)
is Boolean -> map.putBoolean(key, value)