Skip to content

Instantly share code, notes, and snippets.

View kosaikham's full-sized avatar

sai lao kham kosaikham

View GitHub Profile
@kosaikham
kosaikham / Podcasts2018.md
Created November 21, 2018 03:29 — forked from adamayd/Podcasts2018.md
Web Development Podcasts for Beginners in 2018

Web Development Podcasts for Beginners in 2018

Commuting to work from east of Baltimore to Washington DC leaves a lot of time in the car. While driving to work one day early in my web development career, I wondered if there is such a thing as a web development podcast. How would you pull off live coding on a “radio” podcast. Well, you don’t. Well, sometimes they do, but the moral of the story is that I was shocked to find that not only are there web development podcasts, there are a lot of them and really good ones to boot. These podcasts have become staples to my learning and I recommend them to everyone who is just starting out. While there are plenty to listen to, I recommend starting with these. You’ll have plenty of time later to load up deep dives into the V8 JavaScript engine later.

Technology Podcasts

These podcasts are focused more on the technologies used in web development and their use cases.

Syntax - The new kid on the block and by far my favorite right now. Syn

@kosaikham
kosaikham / Google Map Marker LatLong
Created August 17, 2018 04:15 — forked from woodwardtw/Google Map Marker LatLong
A draggable Google Map marker that auto locates and updates on maker drag
<!DOCTYPE html>
<html>
<head>
<title>Geolocation</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body {
height: 100%;
margin: 0px;
@kosaikham
kosaikham / async-await.js
Created July 20, 2018 08:35 — forked from wesbos/async-await.js
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
@kosaikham
kosaikham / MainActivity.java
Created July 13, 2018 21:25 — forked from enginebai/MainActivity.java
Get the current location and display a marker on Google Map.
package com.enginebai.sample;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
@kosaikham
kosaikham / example.html
Created January 29, 2018 12:25 — forked from ezekg/example.html
Example of validating a node-locked license from an Electron app
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Node-locked License Validation Example</title>
</head>
<body>
<button type='button' id='validate-license'>
Validate License
</button>
@kosaikham
kosaikham / crypto-buffer.js
Created January 29, 2018 11:13 — forked from chris-rock/crypto-buffer.js
Encrypt and decrypt buffers in nodejs
// Part of https://github.com/chris-rock/node-crypto-examples
var crypto = require('crypto'),
algorithm = 'aes-256-ctr',
password = 'd6F3Efeq';
function encrypt(buffer){
var cipher = crypto.createCipher(algorithm,password)
var crypted = Buffer.concat([cipher.update(buffer),cipher.final()]);
return crypted;