Skip to content

Instantly share code, notes, and snippets.

View SayChunKim's full-sized avatar
🏠
Baking stuffs

SC Kim SayChunKim

🏠
Baking stuffs
  • Havenice Sdn Bhd
  • Kuala Lumpur
View GitHub Profile
@SayChunKim
SayChunKim / Index.vue
Last active May 8, 2020 21:42
FingerprintJS2 in Single File Component Vue
<template>
<div>
<h1>Fingerprintjs2 with Vue</h1>
<div v-if="loading">
Getting Information...
</div>
<div v-else-if="!loading">
<p style="color:red" v-if="(fingerprintID != '') && (fingerprintID != dbprintID)">YOU'RE FAKE</p>
<p style="color:green" v-else-if="(fingerprintID != '') && (fingerprintID == dbprintID)">YOU'RE LEGIT</p>
<p>
@SayChunKim
SayChunKim / NavBar.vue
Last active April 22, 2020 16:01
BootStrap fixed-top / is-sticky
<template>
<div>
{{screenSize}}
<header></header>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" :class="{'fixed-top' : screenSize == 320}" id="sideNav">
<div class="navbar-brand js-scroll-trigger">
<span class="d-block d-lg-none">SC Kim</span>
<span class="d-none d-lg-block">
<a href="/">
<img id="logo-bg" class="img-fluid mx-auto mb-2"
@SayChunKim
SayChunKim / gcloud_task2.cmd
Created April 11, 2020 22:23
Google Cloud Essentials: Qwik Labs
gcloud container clusters create nucleus-backend \
--num-nodes 1 \
--network nucleus-vpc \
--region us-east1
gcloud container clusters get-credentials nucleus-backend \
--region us-east1
kubectl create deployment hello-server \
--image=gcr.io/google-samples/hello-app:2.0
@SayChunKim
SayChunKim / MainActivity.java
Created October 18, 2017 21:04
Firebase Realtime Database Workshop
package com.sckim.fbtodoapp;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
app.controller('LoginCtrl', ['$scope', '$firebaseAuth', '$location', function($scope, $firebaseAuth, $location) {
// Initialize authObject as
$scope.authObj = $firebaseAuth();
$scope.loginSubmit = function() {
$scope.submitted = true;
console.log($scope);
console.log($scope.player_email + ' ' + $scope.player_password);
$scope.authObj.$signInWithEmailAndPassword($scope.player_email, $scope.player_password).then(function(firebaseUser) {
console.log("User " + firebaseUser.uid + " Signed in!");
@SayChunKim
SayChunKim / index.js
Created February 23, 2017 23:40
Data Passing when Angular DOM is ready via GET URL Params (with $viewValue)
// DATA PASSING TO INPUTS when Document Ready
// SITUATION: ngModel != $viewValue <input type="text" name="food_name" ng-model="part1.food_name">
angular.element(document).ready(function($event) {
// Get CURRENT URL Params (May replace with $http request
var url = $location.search();
console.log(url);
// Get name attribute of form element
console.log($scope.userForm);
$scope.$apply(function() {
package com.example.data.myapplication;
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/iron-collapse/iron-collapse.html">
<dom-module id="my-speaker">
<style>
h1 {
font-weight: 200;
font-size: 42px;
position: absolute;
bottom: 64px;
color: white;
@SayChunKim
SayChunKim / e-SMP_.gitignore
Created January 18, 2015 17:18
e-SMP Project Android Demo
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
@SayChunKim
SayChunKim / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">