Skip to content

Instantly share code, notes, and snippets.

@synsh
synsh / syntax.java
Created February 16, 2018 08:04
All JAVA syntax with example
// A Single line comment
/* A
* Multiple line
* comment
*/
// You can import libraries with helpful methods using import
import java.util.Scanner;
College Roll University Roll Name Email
1 10401215087 Ezechiel Napoleon [email protected]
2 10401215088 Verney Syder [email protected]
3 10401215089 Nathanil Kee [email protected]
4 10401215090 Jedediah Adamsky [email protected]
5 10401215091 Inger Empleton [email protected]
6 10401215092 Jonathon Trussler [email protected]
@synsh
synsh / nginxproxy.md
Created January 26, 2018 18:17 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@synsh
synsh / filename.txt
Created January 14, 2018 06:28 — forked from anonymous/filename.txt
This is an optional description
txt file content
231
@synsh
synsh / check-config.sh
Created January 9, 2018 20:12
check kernel config
#!/usr/bin/env bash
set -e
EXITCODE=0
# bits of this were adapted from lxc-checkconfig
# see also https://github.com/lxc/lxc/blob/lxc-1.0.2/src/lxc/lxc-checkconfig.in
possibleConfigs=(
'/proc/config.gz'
@synsh
synsh / README.md
Last active December 28, 2017 00:35
Deploy Laravel (v5.0) in Cloud9

Change C9 Apache Root Folder

sudo vi /etc/apache2/sites-enabled/001-cloud9.conf

edit the following config:

DocumentRoot <the path you want>
// Shows a dialog that allows the user to install the current instant app.
// https://developer.android.com/topic/instant-apps/reference.html#showinstallprompt
InstantApps.showInstallPrompt(this, new Intent(this, BaseActivity.class), 0, null);
##################################################################
#!/bin/bash
# update the sources
sudo apt update
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::updated apt repos"
sleep 2
# install zip & git
sudo apt -y install zip git
@synsh
synsh / css-media-queries-cheat-sheet.css
Created October 2, 2017 17:22 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@synsh
synsh / up-to-php7-in-cloud9.sh
Created August 7, 2017 19:22 — forked from shingorow/up-to-php7-in-cloud9.sh
On Cloud9, upgrade PHP 5 to 7.
# Install phpbrew
sudo apt-get update
sudo apt-get install libmcrypt-dev
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/
phpbrew init
[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc