Skip to content

Instantly share code, notes, and snippets.

@aliustaoglu
aliustaoglu / Javascript ISO country code to country name conversion
Created September 2, 2019 07:17 — forked from maephisto/Javascript ISO country code to country name conversion
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@aliustaoglu
aliustaoglu / docker-on-android.md
Created July 16, 2019 01:49 — forked from arno01/docker-on-android.md
Docker on Android

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@aliustaoglu
aliustaoglu / Public.md
Created June 26, 2019 23:11
Public APIs

https://github.com/n0shake/Public-APIs

Public-APIs Twitter: @abgbm Build Status PRs Welcome

This is an attempt to categorise different APIs scoured from the web which make their resources available for consumption.

*Items marked with Open Source are open-source *Items marked with 💸 are trial based APIs

var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@aliustaoglu
aliustaoglu / cities.json
Created April 26, 2019 22:31 — forked from Miserlou/cities.json
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@aliustaoglu
aliustaoglu / launch.json
Created March 28, 2019 22:01
Debug Jest/Cucumber/Java with VSCode
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug Cucumber Tests",
"request": "launch",
@aliustaoglu
aliustaoglu / react-native-macos-package-scripts.json
Last active February 15, 2019 22:59
Scripts needed to run React-Native-Macos and solve problems when they happen
{
"start": "node node_modules/react-native-macos/local-cli/cli.js start",
"ios": "react-native run-ios",
"android": "react-native run-android",
"macos": "react-native-macos run-macos",
"test": "jest",
"bundle": "react-native-macos bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform macos",
"debugger-open": "rndebugger-open --port 8081",
"watchman-clear": "watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache",
"install-3rd-party": "cd node_modules/react-native-macos && scripts/macos-install-third-party.sh"
'use strict';
const nJwt = require('./njwt'); //https://www.npmjs.com/package/njwt
const signingKey = 'my super secret key';
exports.handler = function(event, context, callback) {
var token = event.authorizationToken || event.Authorization || event.token;
nJwt.verify(token, signingKey, function(err, verifiedJwt) {
if (err) {

Awesome MQTT

Awesome

A curated list of MQTT related stuff.

MQTT is a lightweight client-server publish/subscribe messaging protocol, optimized for high-latency or unreliable networks. This protocol is a good choice for Internet of Things applications, Telemetry, Sensor Networks, Smart Metering, Home Automation, Messaging and Notification Services.

Contents

@aliustaoglu
aliustaoglu / README.md
Created August 22, 2018 03:50
Watch webpack in production environment with create-react-app (react-scripts)

This configuration works with maven spring framework.

This requires react-app-rewired as dev dependency.

Build script stays as is, add a watch script that will trigger config-overrides using react-app-rewired and it will watch webpack.

{
"scripts": {
 "build": "react-scripts build",