Skip to content

Instantly share code, notes, and snippets.

View frankhn's full-sized avatar
🎗️
Ready!💫

frankhn frankhn

🎗️
Ready!💫
View GitHub Profile
// Segments { length, type: {urban, high-way}}
/**
*
*[
{
distance: Number,
type: urban | high-way
}
]
*.xml
*.json
vendor
*.bk
@frankhn
frankhn / index.html
Created July 31, 2020 18:35
Kapp_test_1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kapp</title>
<link rel="stylesheet" href="./style.css" >
</head>
<body>
<style>
name = 'German_shepherd_dog_04890.jpg'
name1= 'Boston_terrier_02303.jpg'
name2='Beagle_01170.jpg'
name3='Miniature_schnauzer_06884.jpg'
# label = name.rsplit('.', 1)[0]
label = ''.join([i for i in name2.rsplit('.', 1)[0] if not i.isdigit()]).replace("_", ' ').strip()
print label
number_list = [1, 2, 3]
str_list = ['one', 'two', 'three']
classes = ['middle', 'high', 'junior']
# No iterables are passed
# result = zip()
# Converting itertor to list
# result_list = list(result)
# print(result_list)
number_list = [1, 2, 3]
str_list = ['one', 'two', 'three']
classes = ['middle', 'high', 'junior']
# No iterables are passed
# result = zip()
# Converting itertor to list
# result_list = list(result)
# print(result_list)
@frankhn
frankhn / index.html
Created March 17, 2020 10:06
pagination hover animation
<nav><span class="text">NEXT</span>
<div class="left">
<a href="" class="prev"></a>
<a href="">1</a>
<!-- <a href="">2</a>
<a href="">3</a> -->
<span class="line"></span>
</div>
<div class="right">
<a href="" class="next"></a>
@frankhn
frankhn / nodejs-express-cookies-example.js
Created December 16, 2019 13:38 — forked from gdm85/nodejs-express-cookies-example.js
How to create session cookies with Node.js + Express
var express = require('express'),
app = express(),
https = require('https'),
fs = require('fs'),
keys = require( "keygrip" )(['secret1', 'secret2']),
cookies = require( "cookies" );
// This line is from the Node.js HTTPS documentation
var options = {
key: fs.readFileSync('private_key_cert.pem'),
const http = require('http');
const express = require('express')
const path = require('path')
const fs = require('fs')
const bodyParser = require('body-parser')
const Busboy = require('busboy')
let app = express();
app.use(bodyParser.json())