Skip to content

Instantly share code, notes, and snippets.

@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>
@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 / filename.txt
Created January 14, 2018 06:28 — forked from anonymous/filename.txt
This is an optional description
txt file content
231
@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

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 / 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;
def orangecap(d):
(name, max_score, max_name) = ({}, 0, '')
for match in d:
for player in d[match]:
if player not in name:
name[player] = 0
name[player] += d[match][player]
for player in name:
We can't make this file beautiful and searchable because it's too large.
Station Code,Station Name(en),Station Name(hi),Latitude,Longitude
AA,ATARIA,अटरिया,1,2
AABH,AMBIKA BHAWANI HALT,,0,0
AADR,AMB ANDAURA,,31.670257,76.109921
AAG,ANGAR,अंगार,17.954566,75.600185
AAH,ITEHAR,इतेहर,26.562505,78.683653
AAK,ANKAIKILA,अंकेइकिला,20.183107,74.453487
AAL,AMLAI,अमलाई,23.173189,81.593227
AAM,ANGADIPPURAM,अंगदीपुरम,10.979069,76.206923
AAP,AMBIAPUR,अम्बियापुर,26.514974,79.826488
@synsh
synsh / main.js
Created April 16, 2018 18:44
list of most common professions
// collected from https://www.123test.com/professions
//
a = $('#accordion a:not(:has(*))');
for (i = 0; i < a.length; i++)
document.write($(a[i]).text() + '<br>');
@synsh
synsh / cmd.sh
Last active April 19, 2018 09:04
git archive a branch
git archive --format zip --output /full/path/to/zipfile.zip master