Skip to content

Instantly share code, notes, and snippets.

View thesabbir's full-sized avatar

Sabbir Ahmed thesabbir

View GitHub Profile
@thesabbir
thesabbir / squid.conf
Created October 8, 2015 16:28 — forked from GeoffWilliams/squid.conf
squid config file for openwrt. Cache large binary files ONLY and enable intercept proxy
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
'use strict';
angular.module('position')
.controller('PositionCtrl', function ($scope, uiGmapGoogleMapApi, uiGmapIsReady,$state, $stateParams) {
if($stateParams.request == null) {
$state.go('app.request');
}
console.log('PositionCtrl');
document.querySelector('.angular-google-map-container').style.height = document.body.clientHeight + 'px';
uiGmapGoogleMapApi.then(function (maps) {
@thesabbir
thesabbir / flag.c
Last active July 29, 2023 18:40
Bangladeshi flag in turbo C
//Including graphics library
#include<graphics.h>
//Including standard input output library
#include <stdio.h>
//Main function
void main(){
//Initializing graphics
int driver=DETECT, mode=0;
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#!/bin/bash
echo "Select on option:"
echo "1) Set up new PoPToP server AND create one user"
echo "2) Create additional users"
read x
if test $x -eq 1; then
echo "Enter username that you want to create (eg. client1 or john):"
read u
echo "Specify password that you want the server to use:"
read p
@thesabbir
thesabbir / .babelrc
Created April 21, 2016 22:58
Hot Reload Example
{
"presets": ["es2015", "react"],
"plugins": ["react-hot-loader/babel"]
}
function filterFriends(friends, id, status) {
const nextStatus = status === 'available' ? 'unavailable' : 'available';
const online = [];
const offlineFriends = friends.filter((friend) => {
if (friend.contact_uuid !== id && friend.status !== status) {
friend.status = nextStatus;
return true;
}
friend.status = status;
// using redux thunk async action
export function initiateNewChat(id, message) {
return (dispatch, getState) => {
// get friend from friends store
const friend = getState()
.friends[id];
if (friend) {
// if friend exists we initiate new chat
return {
type: 'INITIATE_CHAT',
@thesabbir
thesabbir / contributions.txt
Created May 10, 2016 05:48
All my github contributions
1: Strider-CD/strider-bitbucket
1: TheMightyFingers/mightyeditor
1: ajenti/ajenti
1: appxit/superpos
1: awesomebua/awesomebua
1: balderdashy/angularSails
1: balderdashy/sails
1: bebangladesh/BeReviewsDhaka4
2: choyan/KreFolio
1: code-shoily/vimrc
@thesabbir
thesabbir / github.contrib.pl
Created May 10, 2016 05:49
Script to find out full github contributions
use v5.12;
use warnings;
use utf8;
my $uname = 'thesabbir';
my %projects;
for my $year (2014..2016) {
for my $month (1..12) {
last if $year == 2016 && $month > 1;
my $from = sprintf '%4d-%02d-01', $year, $month;