Skip to content

Instantly share code, notes, and snippets.

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

Iftekher Islam Sunny IftekherSunny

🏠
Working from home
View GitHub Profile
{
"Kwajalein":"(GMT-12:00) International Date Line West",
"Pacific\/Midway":"(GMT-11:00) Midway Island",
"Pacific\/Samoa":"(GMT-11:00) Samoa",
"Pacific\/Honolulu":"(GMT-10:00) Hawaii",
"America\/Anchorage":"(GMT-09:00) Alaska",
"America\/Los_Angeles":"(GMT-08:00) Pacific Time (US & Canada)",
"America\/Tijuana":"(GMT-08:00) Tijuana, Baja California",
"America\/Denver":"(GMT-07:00) Mountain Time (US & Canada)",
"America\/Chihuahua":"(GMT-07:00) Chihuahua",
@IftekherSunny
IftekherSunny / GoMgoSample-1.go
Created January 1, 2017 13:23 — forked from ardan-bkennedy/GoMgoSample-1.go
Sample Go and MGO example
type (
// BuoyCondition contains information for an individual station.
BuoyCondition struct {
WindSpeed float64 `bson:"wind_speed_milehour"`
WindDirection int `bson:"wind_direction_degnorth"`
WindGust float64 `bson:"gust_wind_speed_milehour"`
}
// BuoyLocation contains the buoy's location.
BuoyLocation struct {
@IftekherSunny
IftekherSunny / main.go
Created January 3, 2017 05:21 — forked from cespare/main.go
Example of testing Go HTTP servers using httptest.Server.
package main
import (
"log"
"myserver"
"net/http"
)
const addr = "localhost:12345"
@IftekherSunny
IftekherSunny / GIFEncoder.class.php
Created June 20, 2017 04:39 — forked from SeanJA/GIFEncoder.class.php
dynamic animated gif clock
<?php
/*
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Formerly known as:::
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu
::
:: This class is a rewritten 'GifMerge.class.php' version.
::
:: Modification:
@IftekherSunny
IftekherSunny / api.go
Created June 28, 2017 10:00 — forked from peterhellberg/api.go
A tiny example API written in Go using Martini and Redigo
package main
import (
"flag"
"fmt"
"net/http"
"github.com/codegangsta/martini"
"github.com/garyburd/redigo/redis"
"github.com/martini-contrib/render"
// Element store
const elementStore = class ElementStore {
// set initial state
@observable path = null
@observable visible = false
@observable list = {}
// create a new instance of element store
constructor() {
this.list = sortElementsByName(elements)
CREATE TABLE broadcast_queues_temp
LIKE broadcast_queues;
INSERT INTO broadcast_queues_temp
SELECT *
FROM broadcast_queues
GROUP BY subscriber_id;
DROP TABLE broadcast_queues;
<?php
$unsort = [1,5,2,22,12,39,3];
for($i = count($unsort) - 1; $i > 0; $i--) {
for($j = count($unsort) - 1; $j > 0; $j--) {
if($unsort[$j-1] > $unsort[$j]) {
$temp = $unsort[$j-1];
$unsort[$j-1] = $unsort[$j];
$unsort[$j] = $temp;
<?php
function smart_dump($arg) {
if(env("local")) {
dump($arg);
}
}
smart_dump(request()->all());
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",