Skip to content

Instantly share code, notes, and snippets.

View iamareebjamal's full-sized avatar
🌐
Existing

Areeb Jamal iamareebjamal

🌐
Existing
View GitHub Profile
@iamareebjamal
iamareebjamal / device_info_settings.xml
Last active December 20, 2015 06:49
Method to add custom image in About phone Section of Settings.apk
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android">
<Preference android:title="@string/model_number" android:key="device_model" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/firmware_version" android:key="firmware_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/build_number" android:key="build_number" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/baseband_version" android:key="baseband_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/kernel_version" android:key="kernel_version" android:summary="@string/device_info_default" style="?android:preferenceIn
@iamareebjamal
iamareebjamal / attendance.py
Created July 23, 2015 08:28
Python Script to see attendance of AMU B.Tech students by providing Faculty Number.
import requests
from bs4 import BeautifulSoup
fac_no = input('Enter Faculty Number:')
data = {'faculty_number' : fac_no, 'submit' : 'submit'}
page = requests.post('http://ctengg.amu.ac.in/student_wise_attendance.php', data)
attendance = BeautifulSoup(page.text).findAll('table')[0]
index = attendance.text.find('Name') + len('Name')
@iamareebjamal
iamareebjamal / Amigho.java
Created December 20, 2015 13:45
An extremely lolly easy encryption algorithm by Amogh Kulkarni
import java.util.*;
public class Amigho
{
public static boolean isUpper(char c){
return (c>='A'&&c<='Z');
}
public static boolean isLower(char c){
@iamareebjamal
iamareebjamal / BinarySearch.cpp
Last active January 26, 2016 14:18
Binary Search ALDS Lab
#include <iostream>
#include <vector>
#include <algorithm>
#define tmpl8 template <typename T>
using namespace std;
int binCount = 0;
@iamareebjamal
iamareebjamal / basic_server.js
Last active January 16, 2017 20:39
Basic Node Server to capture images and display in multipart using boundary
/* Node Server
* Captures image and displays them using multipart and boundary headers
* 16th Jan 2016
* Author : Areeb Jamal, Rahul Jha
*/
var fs = require('fs'),
http = require('http'),
express = require('express'),
NodeWebcam = require("node-webcam");
#include <iostream>
#include <stdio.h>
#include <sys/stat.h>
#include "socketreceiver.h"
using namespace std;
int file_exists(string filename) {
struct stat buffer;
return (stat (filename.c_str(), &buffer) == 0);
@iamareebjamal
iamareebjamal / GSoC2017_Report_iamareebjamal.md
Last active March 28, 2019 12:21
Final Project Report for GSoC 2017 - iamareebjamal

GSoC 2017 Open Event Orga App, Areeb Jamal - FOSSASIA

This GSoC, I worked on Open Event Orga App where we created Android client for the Open Event Orga API for event management. The app allows organizers to sign up and log in, view sale analytics, scan QR code and check in attendees, manage and create tickets.

The app also contains following features:

  • Sales overview with graphs
  • More fluent QR scan workflow
  • Background job scheduling for offline support
  • Event and Organizer Info
  • Uniform and modern material look
import time
import hashlib
class Block:
def __init__(self, index, data, previous_hash=None):
self.index = index
self.data = data
self.previous_hash = previous_hash
self.timestamp = time.time()
@iamareebjamal
iamareebjamal / redis-quickstart.sh
Created March 16, 2018 15:54
Redis Quickstart
#!/bin/bash
echo "$(tput setaf 6)$(tput bold)○ Checking Redis...$(tput sgr0)"
# Check if Redis CLI is present
if ! [ -x "$(command -v redis-cli)" ]; then
# If not, provide users an option to download
echo " $(tput setaf 3)$(tput bold)• Redis is not installed or on the path$(tput sgr0)"
read -p " Do you want to install it? $(tput dim)(Y/N)$(tput sgr 0) " prompt
if [[ $prompt =~ [yY] ]]; then
# Check if tools required to download and install redis are present