Skip to content

Instantly share code, notes, and snippets.

View tjunussov's full-sized avatar

Tim TJey Jun tjunussov

View GitHub Profile
## DEFAULT
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name host1.org host2.org;
autoindex off;
log_not_found off;
client_max_body_size 1M;
##
## Generating client certificatie
## https://gist.github.com/mtigas/952344
## sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout bein.tech.key -out bein.tech.crt
# openssl genrsa -des3 -out bein.tech.key 4096
# openssl req -new -x509 -days 365 -key bein.tech.key -out bein.tech.crt
# openssl req -new -key client.key -out client.csr
# ---- or
@tjunussov
tjunussov / Linux ESCPOS Raw Printer
Last active June 20, 2018 11:29
listen on port and pass data to printer
chmod 666 /dev/usb/lp0
nc -lvk 9100 > /dev/usb/lp0
# l listen
# k liten forever
# v verbose
////////////// HTML - CONSOLE.log ///////
<pre id="log"></pre>
(function () {
var _log = console.log;
var logger = document.getElementById("log");
console.log = function (message) {
if (typeof message == "object") {
logger.innerHTML += (JSON && JSON.stringify ? JSON.stringify(message) : message) + "\n";
@tjunussov
tjunussov / index.html
Created November 28, 2017 08:35
SM Calendar // source http://jsbin.com/kumewog
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>SM Calendar</title>
<script src="https://unpkg.com/vue@latest/dist/vue.js"></script>
<style id="jsbin-css">
html,body {
height:300px;
@tjunussov
tjunussov / Vuejs Cheatsheet
Last active April 1, 2018 12:00
Vue Framework Cheatsheet
# Default webpack installation
npm i --save-dev stylus stylus-loader pug pug-loader --save bootstrap-vue vuex
# v-on on component only listens for custom evenets ( $emit("") )
<mycomp @click.native="add()"/>
# or inside component emit
<mycomp @click="add()">
<div @click="$emit('click')">
@tjunussov
tjunussov / index.html
Last active June 28, 2017 20:34
Calendar multicolumn scrollable vue
<style id="jsbin-css">
html,body {
height:300px;
width:756px;
font-family:monospace;
}
/********* reseting ************/
ul,li {
padding: 0;
margin: 0;
// bootsrtap row not gutters ( pading between )
row.no-gutters
// Chrome console.log coloring
console.log("%cUser %s has %d points", "color:orange; background:blue; font-size: 16pt", 'User', 100);
// Height Transition Effect - with height:auto;
book {
max-height:100px; <-- default height
@tjunussov
tjunussov / sublime.snippets
Created June 13, 2017 05:52
console.log, console.dir
<snippet>
<!-- put this file in /packages/User/<Folder Name>/console_log.sublime-snippet then restart your Sublime Text 2 -->
<content><![CDATA[console.log($1);$0]]></content>
<tabTrigger>cl</tabTrigger>
<scope>text.html,source.js</scope>
<description>console.log()</description>
</snippet>
<snippet>
<!-- put this in another file /packages/User/<Folder Name>/console_dir.sublime-snippet then restart your Sublime Text 2 -->
@tjunussov
tjunussov / nginx,cheatsheet
Last active February 3, 2017 18:11
Nginx configurations
// PJAX partial or full
map $http_x_pjax $file_suffix {
default "";
true ".partial";
}
## Static html ( converted )
server {
server_name ux.domain;
listen 80;