Skip to content

Instantly share code, notes, and snippets.

View tjunussov's full-sized avatar

Tim TJey Jun tjunussov

View GitHub Profile
@tjunussov
tjunussov / SSLPoke.java
Created April 16, 2016 18:34
Confluence Email Send SSL issue - Add certificate to java keystore ( Linux )
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
@tjunussov
tjunussov / nginx_compile.txt
Created April 22, 2016 16:42
Compile Custom Nginx
./configure \
--user=nginx \
--group=nginx \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
@tjunussov
tjunussov / nginx.conf
Created April 22, 2016 18:28
Nginx Configurations
try files in file system or proxy_pass it
******************************************
location /reports/ {
try_files $uri @reports;
}
@tjunussov
tjunussov / escpos-p.html
Created August 8, 2016 06:48
ESC-P Format
------------------------------------------ E1.xml ----------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<page width="112" line-height="9" margin-left="10" margin-right="122" printer="EPSON LX 300+II">
<table line-height="4">
<tc>
<td>-------------------------------------------</td>
<td>| КОПИЯ EMS KAZPOST/EMS KAZPOST КОШИРМЕСИ |</td>
<td>-------------------------------------------</td>
</tc>
<tc>
#!/usr/bin/lua
require "nixio"
print("Access-Control-Allow-Origin: *\n")
local utf8_decode={
[128]={[147]='\150',[148]='\151',[152]='\145',[153]='\146',[154]='\130',[156]='\147',[157]='\148',[158]='\132',[160]='\134',[161]='\135',[162]='\149',[166]='\133',[176]='\137',[185]='\139',[186]='\155'},
[130]={[172]='\136'},
[132]={[150]='\185',[162]='\153'},
BEGIN
BEGIN EXECUTE IMMEDIATE 'DROP TABLE confluence.bandana_tmp';
EXCEPTION WHEN OTHERS THEN dbms_output.put_line('Not Dropped'); END;
EXECUTE IMMEDIATE 'CREATE TABLE confluence.bandana_tmp AS SELECT * FROM confluence.bandana WHERE ROWNUM < 2';
EXECUTE IMMEDIATE 'DELETE FROM bandana_tmp';
FOR a IN (
SELECT ROWNUM, a.bandanaid, a.bandanacontext, a.bandanakey, a.bandanavalue
<VirtualHost *:80>
DocumentRoot "I:\[ Work ]\_Kazpost\monitor.kazpost.kz\site"
ServerName monitor.kazpost.loc
DirectoryIndex index.html index.xhtml
AddType text/xsl .xsl
<Directory "I:/[ Work ]/_Kazpost/monitor.kazpost.kz/site">
Options Indexes FollowSymLinks
Конфигурация NGINX
root /var/nginx/www/my.kazpost.kz;
location / {
try_files /500.html @conf;
}
location @conf {
proxy_redirect off;
@tjunussov
tjunussov / windows.txt
Created October 4, 2016 07:12
Windows Cleanup
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Dism.exe /online /Cleanup-Image /SPSuperseded
SUB FOLDERS & SIZES
11.4 GB C:\Windows\winsxs
2.4 GB C:\Windows\System32
2.2 GB C:\Windows\Installer
1.7 GB C:\Windows\assembly
1.2 GB C:\Windows\SysWOW64
@tjunussov
tjunussov / scrolable.html
Last active October 20, 2016 18:50
Scrollable Layout with autowidth
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Scrollable</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="application/javascript"></script>
<style>
html,body { width: 100%; height:100%; display: block; }
* { box-sizing: border-box; padding: 0; margin: 0;}