Skip to content

Instantly share code, notes, and snippets.

View rajasimon's full-sized avatar
🏠
Working from home

Raja Simon rajasimon

🏠
Working from home
  • Tamilnadu, India
  • 00:01 (UTC +05:30)
  • X @rajasimon
View GitHub Profile
{
"close_windows_when_empty": true,
"color_scheme": "Packages/ayu/ayu-mirage.tmTheme",
"draw_white_space": "all",
"folder_exclude_patterns":
[
".git",
"venv"
],
"font_face": "Fira Code",
@rajasimon
rajasimon / default
Created November 5, 2018 13:10
Nginx configuration
http {
upstream alert {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
# Unix domain servers
server unix:/tmp/hnalert_1.sock fail_timeout=0;
server unix:/tmp/hnalert_2.sock fail_timeout=0;
server unix:/tmp/hnalert_3.sock fail_timeout=0;
server unix:/tmp/hnalert_4.sock fail_timeout=0;
<h2>Privacy Policy</h2>
<p>Your privacy is important to us. It is xyzhq's policy to respect your privacy regarding any information we may collect from you across our website, <a href="https://validateyour.app/idea">https://validateyour.app/idea</a>, and other sites we own and operate.</p>
<p>We only ask for personal information when we truly need it to provide a service to you. We collect it by fair and lawful means, with your knowledge and consent. We also let you know why we’re collecting it and how it will be used.</p>
<p>We only retain collected information for as long as necessary to provide you with your requested service. What data we store, we’ll protect within commercially acceptable means to prevent loss and theft, as well as unauthorised access, disclosure, copying, use or modification.</p>
<p>We don’t share any personally identifying information publicly or with third-parties, except when required to by law.</p>
<p>Our website may link to external sites that are not operated by us. Please be aware
<h2>xyzhq Terms of Service</h2>
<h3>1. Terms</h3>
<p>By accessing the website at <a href="https://validateyour.app/idea">https://validateyour.app/idea</a>, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this website are protected by applicable copyright and trademark law.</p>
<h3>2. Use License</h3>
<ol type="a">
<li>Permission is granted to temporarily download one copy of the materials (information or software) on xyzhq's website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:
<ol type="i">
<li>modify or copy the materials;</li>
<li>use the materials for any commercial purpose, or for any public display (commercial or non-commercial);</li>
"""
Copy file Operation
"""
import os
import shutil
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--name', required=True)
{
"always_show_minimap_viewport": false,
"bold_folder_labels": true,
"caret_extra_width": 1,
"caret_style": "phase",
"close_windows_when_empty": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"draw_white_space": "all",
"fade_fold_buttons": false,
"folder_exclude_patterns":
@rajasimon
rajasimon / volleyball.py
Created July 8, 2016 05:25
Enter Volleyball score and get the winner
#! /usr/bin/env python
class VolleyBall:
def __init__(self):
# score
self.team_one = 0
self.team_two = 0
self.no_of_matches = 5
@rajasimon
rajasimon / python_datetime
Last active August 29, 2015 14:24
Python Date
from datetime import datetime
datetime.fromtimestamp(1435916104) #datetime.datetime(2015, 7, 6, 2, 20, 14)
datetime.now().strftime('%Y-%m-%d') #'2015-07-09'
# Convert datetime to timestamp
import time
time.mktime(date.timetuple())
@rajasimon
rajasimon / psql
Last active August 29, 2015 14:10
postgres psql
By default installation postgres have default password that is default system password
/etc/init.d/postgresql status
service postgresql status
sudo -u postgres psql
CREATE USER panasimon with PASSWORD 'password';
@rajasimon
rajasimon / app.yaml
Last active August 29, 2015 14:08
Google Appengine yaml
application: your-project
version: 1
threadsafe: true
runtime: python27
api_version: 1
handlers:
- url: /
static_files: index.html