Skip to content

Instantly share code, notes, and snippets.

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

Mohammad Arafath ironmanMA

🏠
Working from home
View GitHub Profile
@ironmanMA
ironmanMA / MM_CUDA_SM.c
Last active August 29, 2015 14:01 — forked from wh5a/mp3.c
// MP 2: Due Sunday, Dec 16, 2012 at 11:59 p.m. PST
#include <wb.h>
#define wbCheck(stmt) do { \
cudaError_t err = stmt; \
if (err != cudaSuccess) { \
wbLog(ERROR, "Failed to run stmt ", #stmt); \
return -1; \
} \
} while(0)
@ironmanMA
ironmanMA / ScreenScraper.cs
Created May 29, 2014 16:07
screen scraper application on c# (using HTML-Agility-Pack)
/*
* Screen Scraping Application (from Yahoo Weather)
* @author : Mohammad Arafath
* @email : [email protected]
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
@ironmanMA
ironmanMA / 0_reuse_code.js
Created May 31, 2014 11:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ironmanMA
ironmanMA / tomcat8_main.yml
Created February 8, 2015 23:16 — forked from mNantern/main.yml
main-task for ansible role tomcat8
- name: install package openJDK 7
apt: pkg=openjdk-7-jdk update_cache=yes
sudo: yes
- name: create archives folder
file: path=/home/vagrant/archives state=directory
- name: Download Tomcat 8
get_url: url="http://apache.crihan.fr/dist/tomcat/tomcat-8/v8.0.0-RC1/bin/apache-tomcat-8.0.0-RC1.tar.gz" dest=/home/vagrant/archives/
- name: Create tomcat directory
file: name=/opt/apache-tomcat owner=vagrant group=vagrant state=directory
sudo: yes
@ironmanMA
ironmanMA / tomcat8.sh
Last active August 29, 2015 14:15 — forked from boniface/tomcat8.sh
Startup Script for tomcat8
#Create Group
# groupadd tomcat
# useradd -g tomcat -d /usrlocal/tomcat8 tomcat
# usermod -G www-data tomcat
# chown tomcat:tomcat /usrlocal/tomcat8 -R
# vim /etc/init.d/tomcat
#!/bin/sh
import sys, cv2
# Refactored https://realpython.com/blog/python/face-recognition-with-python/
def cascade_detect(cascade, image):
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
return cascade.detectMultiScale(
gray_image,
scaleFactor = 1.15,
minNeighbors = 5,
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import urllib
import urllib2
import httplib
import json
@ironmanMA
ironmanMA / bucket_policy.js
Created September 23, 2015 23:19 — forked from philfreo/bucket_policy.js
AWS S3 bucket policy to make all files public (+CORS)
{
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucket_name_here/*"
@ironmanMA
ironmanMA / 00.howto_install_phantomjs.md
Created January 25, 2016 13:10 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@ironmanMA
ironmanMA / autoscale_sample.py
Last active June 4, 2016 13:08 — forked from liamf/autoscale_sample
Demonstrates using patched boto to create an autoscaling group of servers, scaled up/down by CPU Utilisation
#################################################################################
# Import modules
#################################################################################
import os
import time
import sys
import socket
import string