Skip to content

Instantly share code, notes, and snippets.

View anistark's full-sized avatar
💻
Open Innovation and Development

Ani anistark

💻
Open Innovation and Development
View GitHub Profile
@anistark
anistark / meta-tags.md
Created March 21, 2017 20:33 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
def password_strength(password):
"""
Verify the strength of 'password'
Returns a dict indicating the wrong criteria
A password is considered strong if:
8 characters length or more
1 digit or more
1 symbol or more
1 uppercase letter or more
1 lowercase letter or more
@anistark
anistark / server_setup.md
Last active January 20, 2025 20:28
Server Setup

Setting up User (for root systems)

Setup New User:

adduser username

Enter a password. (Generate a strong password like: openssl rand -base64 18)

@anistark
anistark / run_shell.java
Created December 6, 2016 07:24
Run Shell CMD via code
import java.io.*;
class Main {
public static void main(String[] args) {
String command = "ls";
try {
Process process = Runtime.getRuntime().exec(command);
BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
@anistark
anistark / sqs.py
Created September 5, 2016 17:55 — forked from philchristensen/sqs.py
Minimal script for sending/reading from Amazon SQS using Boto/Python.
conf = {
"sqs-access-key": "",
"sqs-secret-key": "",
"sqs-queue-name": "",
"sqs-region": "us-east-1",
"sqs-path": "sqssend"
}
import boto.sqs
conn = boto.sqs.connect_to_region(
@anistark
anistark / postgresHelp.md
Last active January 10, 2018 08:47
Postgres Most used commands

Postgres

Run :

psql -d test -U postgres -W

Most frequently used commands :

@anistark
anistark / reinstallMeteor.sh
Last active August 20, 2016 09:02
Script to remove and install fresh meteor
#!/bin/bash
sudo mrt uninstall
sudo mrt uninstall --system
rm -rf ~/.meteorite
sudo rm /usr/local/bin/meteor
rm -rf ~/.meteor
sudo chown -R $(whoami) ~/.npm
@anistark
anistark / python_errors.md
Last active September 6, 2016 10:19
Common Python Errors

Common Python Errors and handling them

lxml error on mac

Occurance :

    #include "libxml/xpath.h"
             ^
 1 error generated.
@anistark
anistark / usefulCmds.md
Last active November 8, 2016 07:32
Useful Commands

Useful Commands

Create simple server on the current directory u r in

Python

python -m SimpleHTTPServer 8000
#import necessary libraries
import cv2
import numpy as np
#capture video from the webcam
cap = cv2.VideoCapture(0)
#load the face finder
face_cascade = cv2.CascadeClassifier('/home/sm/Desktop/haarcascade_frontalface_default.xml')