Skip to content

Instantly share code, notes, and snippets.

View thesabbir's full-sized avatar

Sabbir Ahmed thesabbir

View GitHub Profile
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
root /srv/build;
@thesabbir
thesabbir / stuns.js
Created May 15, 2016 07:12 — forked from yetithefoot/stuns
STUN+TURN servers list
[{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@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;
@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
// 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',
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;
@thesabbir
thesabbir / .babelrc
Created April 21, 2016 22:58
Hot Reload Example
{
"presets": ["es2015", "react"],
"plugins": ["react-hot-loader/babel"]
}
#!/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
# 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):
@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;