Skip to content

Instantly share code, notes, and snippets.

View tanishq14developer's full-sized avatar
🎯
Focusing

Tanishq Chawda tanishq14developer

🎯
Focusing
View GitHub Profile
@gonzaloplaza
gonzaloplaza / aws_ec2_nginx_jenkins_installation.md
Last active October 14, 2022 05:35
Jenkins Installation under NGINX - Ubuntu 16.04 on AWS EC2 t2.micro (custom subdomain)

Jenkins Installation through NGINX proxy - Ubuntu 16.04 on AWS EC2 (custom tld subdomain)

The following guide includes all steps needed to install a Jenkins Server on AWS EC2 (Ubuntu 16.04 LTS), using NGINX as proxy with custom tld

  1. Set up EC2 instance
  • Selected type: t2.micro (1GB) (for this example, you can choose any type)
  • AMI: Ubuntu 16.04 LTD 64bits (AWS AMI repository)
  • 20GB SSD storage
  • Security Group: Opened (inbound) for web ports: 80, 443 and 22
@medyo
medyo / YouTubePlayerSupportFragmentX.java
Last active June 7, 2023 13:48
Solution: YouTubePlayerSupportFragment that supports androidx
package com.google.android.youtube.player;
/**
* Please create this directories schema com.google.android.youtube.player and post the file there
*/
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 25, 2024 06:56
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@fvilarino
fvilarino / shared_app_bar_final.kt
Last active June 6, 2024 15:09
Shared App Bar - Final
val HomeRoute = "home"
val SettingsRoute = "settings"
val ManyOptionsRoute = "manyOptions"
val NoAppBarRoute = "noAppBar"
sealed interface Screen {
val route: String
val isAppBarVisible: Boolean
val navigationIcon: ImageVector?
val navigationIconContentDescription: String?
@fvilarino
fvilarino / ticker_final.kt
Last active February 9, 2024 16:04
Ticker Final
private val TickerCycleMillis = 150
private object AlphabetMapper {
private val Alphabet = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789•".toList()
val size: Int = Alphabet.size
fun getLetterAt(index: Int): Char = Alphabet[index % size]
fun getIndexOf(letter: Char, offset: Int = 0): TickerIndex {