Skip to content

Instantly share code, notes, and snippets.

View aswzen's full-sized avatar
😁
what the fun

Agus Sigit Wisnubroto aswzen

😁
what the fun
View GitHub Profile
@agarzon
agarzon / random_color.php
Last active September 11, 2023 17:04
PHP Random Color Generator Hex
<?php $color = dechex(rand(0x000000, 0xFFFFFF)); ?>
<body style="background-color: <?php echo $color; ?>;">
<h1><?php echo $color ?></h1>
</body>
@nrrrdcore
nrrrdcore / inset_input.css
Created August 9, 2012 23:35
The Perfect Inset Input CSS
input {
height: 34px;
width: 100%;
border-radius: 3px;
border: 1px solid transparent;
border-top: none;
border-bottom: 1px solid #DDD;
box-shadow: inset 0 1px 2px rgba(0,0,0,.39), 0 -1px 1px #FFF, 0 1px 0 #FFF;
}
crack Sublime Text (2 and 3)
1. Open Sublime in a HEX editor (the executable file)
2. Find 43 33 33 42 30 32
3. Replace in the string 33 42 with 32 42
4. Save
5. Enter the license below:
—–BEGIN LICENSE—–
Patrick Carey
@mp911de
mp911de / Standalone.java
Created October 30, 2017 20:35
Create Redis Connections with pooling
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@ugur93
ugur93 / CacheConfig
Last active April 7, 2024 15:51
Example of Spring Redis Cache Configuration using Spring-Data-Redis Lettuce Driver
import com.lambdaworks.redis.resource.DefaultClientResources;
import com.lambdaworks.redis.resource.Delay;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.CacheErrorHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@guozi
guozi / ExpirationListener.java
Created August 22, 2018 05:36 — forked from jdonee/ExpirationListener.java
Spring Boot 2 + Spring Session 2 + Shiro 1.4 + Redis(Lettuce) Config
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;
import lombok.extern.slf4j.Slf4j;
/**
* Session过期监听
* @author Frank Zeng
*