Skip to content

Instantly share code, notes, and snippets.

View arma7x's full-sized avatar
🎯
Focusing

Ahmad Malik arma7x

🎯
Focusing
  • PayPal ahmadmuhamad101@gmail.com
  • MY
View GitHub Profile
@arma7x
arma7x / app_arma.js
Last active August 24, 2020 10:31 — forked from sreelash/app_arma.js
window.addEventListener("load", function() {
console.log("Loaded screen updated")
var deviceFound;
var writeCharacteristic;
var readCharacteristic;
if (navigator.mozBluetooth !== undefined) {
console.log("Not undefined")
@arma7x
arma7x / main.dart
Created May 3, 2019 22:20 — forked from branflake2267/main.dart
Flutter - Navigation Drawer Left or Right
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
@arma7x
arma7x / goQueryTest.go
Created April 10, 2019 17:20 — forked from salmoni/goQueryTest.go
Parsing HTML in Go/Golang using goQuery to extract data from only one of multiple tables. Demonstrates nested Find statements.
package main
import (
"fmt"
"log"
"strings"
"github.com/PuerkitoBio/goquery"
)
@arma7x
arma7x / polyline_decoder.js
Created February 22, 2018 14:24 — forked from ismaels/polyline_decoder.js
Javascript function to decode google maps api polyline
// source: http://doublespringlabs.blogspot.com.br/2012/11/decoding-polylines-from-google-maps.html
function decode(encoded){
// array that holds the points
var points=[ ]
var index = 0, len = encoded.length;
var lat = 0, lng = 0;
while (index < len) {
var b, shift = 0, result = 0;
@arma7x
arma7x / index.php
Created August 12, 2016 21:27 — forked from geggleto/index.php
Slim 3 Middleware - Force HTTPS
$app->add(function (Request $request, Response $response, $next) {
if ($request->getUri()->getScheme() !== 'https') {
$uri = $request->getUri()->withScheme("https")->withPort(null);
return $response->withRedirect( (string)$uri );
} else {
return $next($request, $response);
}
});