Skip to content

Instantly share code, notes, and snippets.

@synsh
synsh / README.md
Last active January 28, 2021 13:18

npx demo

npx https://gist.github.com/sahasayan/1ce1944764d19b19d74e8879de8c7d07

1 2 3
4 5 6
7 8 9
10 11 12
##
# Install JAVA
#
yum -y update
yum -y install java-1.8.0-openjdk
java -version
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre/bin/java
@synsh
synsh / goals.md
Created November 4, 2018 16:01 — forked from shimondoodkin/goals.md
plain vanilla node.js intro tutorial to learn a lot in the shortest time.

The plan is to take a simple nodejs server. and add to it simple file serving capabilities. also to have a custom responce to a certien url. to be able to make a simple api in addition of serving files.

goals:

  • to learn read the documentation
  • to understand the whole concept
  • to use some api for hands on expirience
  • streach goal: learn basic npm usage.
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 11 columns, instead of 7. in line 7.
first_name,last_name,phone_number,address,company,website,email,city,state,country,zip
Merell,Fazan,+1 (812) 117-9450,546 Buhler Drive,Midel,mfazan0@illinois.edu,mfazan0@unicef.org,Evansville,Indiana,United States,47725
Miriam,Killen,+1 (520) 349-8449,2 Tomscot Terrace,Voomm,mkillen1@ucoz.com,mkillen1@unc.edu,Tucson,Arizona,United States,85725
Fayette,Siviter,+1 (318) 670-4766,3495 Huxley Trail,Blognation,fsiviter2@msu.edu,fsiviter2@digg.com,Monroe,Louisiana,United States,71213
Yorker,Gore,+1 (304) 816-2997,264 Pennsylvania Way,Skibox,ygore3@oaic.gov.au,ygore3@acquirethisname.com,Huntington,West Virginia,United States,25705
Winonah,Redmond,+1 (605) 599-0161,8311 Troy Pass,Lajo,wredmond4@123-reg.co.uk,wredmond4@bigcartel.com,Sioux Falls,South Dakota,United States,57110
Editha,Oldfield-Cherry,+1 (918) 754-2989,92821 Porter Terrace,Livetube,eoldfieldcherry5@desdev.cn,eoldfieldcherry5@php.net,Tulsa,Oklahoma,United States,74170
Rozina,Matzaitis,+1 (205) 896-0289,7 Fallview Junction,Oyoloo,rmatzaitis6@usatoday.com,
#user nobody;
worker_processes auto;
worker_rlimit_nofile 2048;
error_log /var/log/nginx/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@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
@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>');
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
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: