Skip to content

Instantly share code, notes, and snippets.

View ovicko's full-sized avatar
🎯
Focusing

AMWOLLO VICTOR ovicko

🎯
Focusing
View GitHub Profile
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active May 16, 2024 09:52
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

final AlertDialog dialogBuilder = new AlertDialog.Builder(this).create();
LayoutInflater inflater = this.getLayoutInflater();
View dialogView = inflater.inflate(R.layout.custom_dialog, null);
final EditText editText = (EditText) dialogView.findViewById(R.id.edt_comment);
Button button1 = (Button) dialogView.findViewById(R.id.buttonSubmit);
Button button2 = (Button) dialogView.findViewById(R.id.buttonCancel);
button2.setOnClickListener(new View.OnClickListener() {
@Override
@zizibaloob
zizibaloob / MainActivity.java
Created November 13, 2017 22:10
Tiny app to demonstrate nested RecyclerViews
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
RecyclerView recycler = findViewById(R.id.list);
recycler.setLayoutManager(new LinearLayoutManager(this));
recycler.setAdapter(new CategoriesAdapter());
@esilvajr
esilvajr / kmskeys10.txt
Created November 6, 2017 17:38 — forked from CHEF-KOCH/kmskeys10.txt
Windows 10 KMS Keys
Windows.10.and.Office.2016.gVLK
#####################################################################
# Install/Uninstall keys #
#####################################################################
1.) Uninstall the current product by entering the “uninstall product key” extension:
slmgr.vbs /upk
2.) Install the key that you obtained above for “Windows Srv 2012R2 DataCtr/Std KMS for Windows 10”
@sareiodata
sareiodata / tpl-blank-page.php
Last active March 21, 2024 08:29
Empty WordPress page template
<?php
/**
* Template Name: Blank Template
*
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>