Skip to content

Instantly share code, notes, and snippets.

View htr3n's full-sized avatar

Alex T. htr3n

View GitHub Profile
@htr3n
htr3n / wildfly-install.sh
Created April 19, 2021 23:25 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final
@htr3n
htr3n / UuidUtil.java
Created April 19, 2021 04:21
Helper class to work with Java UUID
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.UUID;
/**
* This class provides helper methods to work with UUID, for instance, converting UUID into 16-byte
* array for database column BINARY(16) and vice versa.
*/
public final class UuidUtil
{
@htr3n
htr3n / gist-theme.css
Last active December 23, 2020 01:22
A template for Gist theme
/*
* https://github.com/StylishThemes/GitHub-Dark/issues/197#issuecomment-63095957
*/
.pl-coc /* constant.other.color */,
.pl-entl /* entity.name.tag.label */,
.pl-entm /* entity.name.type.module */,
.pl-eoa /* entity.other.attribute-name */,
.pl-mai .pl-sf /* meta.at-rule.include support.function */,
.pl-mm /* meta.module-reference */,
.pl-pdv /* punctuation.definition.variable */,
@htr3n
htr3n / cloudSettings
Last active November 10, 2020 23:43
VSCode/Codium settings
{"lastUpload":"2020-11-10T23:43:02.343Z","extensionVersion":"v3.4.3"}
@htr3n
htr3n / termite-install.sh
Created August 19, 2019 05:29
Debian/Ubuntu-specific termite installation script
#!/usr/bin/env sh
sudo apt-get install -y \
git \
g++ \
libgtk-3-dev \
gtk-doc-tools \
gnutls-bin \
valac \
intltool \
@htr3n
htr3n / walk.py
Last active April 22, 2019 00:57
Python -- traverse a folder
import os
for dirname, dirnames, filenames in os.walk('.'):
# print path to all subdirectories first.
for subdirname in dirnames:
print(os.path.join(dirname, subdirname))
# print path to all filenames.
for filename in filenames:
print(os.path.join(dirname, filename))
@RestController
class HelloWorld {
@RequestMapping("/")
public String hello(){
return "Hello World!";
}
}
package io.github.htr3n.springjdbcsimple.entity;
public class Customer {
private Integer id;
private String name;
private String email;
public Integer getId() {
return id;
}
/*
https://stackoverflow.com/a/37832318/339302
*/
.rainbow2 {
background-image: -webkit-linear-gradient(left, #E0F8F7, #585858, #fff); /* For Chrome and Safari */
background-image: -moz-linear-gradient(left, #E0F8F7, #585858, #fff); /* For old Fx (3.6 to 15) */
background-image: -ms-linear-gradient(left, #E0F8F7, #585858, #fff); /* For pre-releases of IE 10*/
background-image: -o-linear-gradient(left, #E0F8F7, #585858, #fff); /* For old Opera (11.1 to 12.0) */
background-image: linear-gradient(to right, #E0F8F7, #585858, #fff); /* Standard syntax; must be last */
color:transparent;
const htmlmin = require("gulp-htmlmin");
//...
gulp.task("minify-html", function(done) {
let publicFolder = "./public";
let html = publicFolder + "/**/*.html";
let css = publicFolder + "/**/*.css";
let js = publicFolder + "/**/*.js";
let dest = "./dist";
log("Minifying HTML/CSS/JS in '" + publicFolder + "' to '" + dest + "'");
gulp.src(publicFolder + "/**")