Skip to content

Instantly share code, notes, and snippets.

@gloony
gloony / UglifyCSS.js
Last active October 5, 2018 13:46
StandAlone (for browser) port of https://github.com/fmarcia/UglifyCSS
/**
* UglifyCSS - StandAlone
* Port of UglifyCSS
* Author: David Chardonnens - https://github.com/gloony
* MIT licenced
*/
/**
* UglifyCSS
* Port of YUI CSS Compressor to NodeJS
@gloony
gloony / roundcube_menuhover.css
Last active November 7, 2018 16:56
For hide menu bar on roundcube elastic template and showed only when mouse is hover
.menu .button.about{
display: none!important}
@media screen and (min-width: 481px){
.menu .popover-header img{
display:none}
.menu .popover-header{
width:0;
height:0!important;
min-height:0!important}}
@media screen and (min-width: 1025px){
@gloony
gloony / locStore.js
Created November 2, 2018 21:10
Set var with localStorage or in array if not available
var locStore = {
internalVar: [],
get: function(name){
if(typeof localStorage!=='undefined') return localStorage.getItem(name);
else if(locStore.internalVar[name]!==undefined) return locStore.internalVar[name];
else return null;
},
set: function(name, value){
if(typeof localStorage!=='undefined') return localStorage.setItem(name, value);
else locStore.internalVar[name] = value;
@gloony
gloony / SimpleKeyboardHistory.ahk
Created May 16, 2019 14:33 — forked from 4rc0s/SimpleKeyboardHistory.ahk
AutoHotKey clipboard history script that is easily navigated and relatively short
; Retrieves saved clipboard information since when this script last ran
Loop C:\tmp\clipvar*.txt
{
clipindex += 1
FileRead clipvar%A_Index%, %A_LoopFileFullPath%
FileDelete %A_LoopFileFullPath%
}
maxindex := clipindex
OnExit ExitSub
@gloony
gloony / material-icons.css
Created November 18, 2019 22:20 — forked from loicbisiere/material-icons.css
Material icons with unicode
/*
* CSS File of Material icons.
* CSS code based on:
* https://google.github.io/material-design-icons/#icon-font-for-the-web
*/
//= depend_on_asset "MaterialIcons-Regular.eot"
//= depend_on_asset "MaterialIcons-Regular.woff2"
//= depend_on_asset "MaterialIcons-Regular.woff"
//= depend_on_asset "MaterialIcons-Regular.ttf"
@gloony
gloony / Minecraft_bds_ScreenLogReader.php
Last active January 11, 2020 18:17
Add view per user
<?php
// Screen for Server must be open with : screen -dmS minecraft -L -Logfile /home/ubuntu/minecraft/screen.log
$cnx = array();
$handle = fopen("/home/ubuntu/minecraft/screen.log", "r");
if($handle){
while(($line = fgets($handle))!== false){
$line = str_replace(array("\r", "\n"), '', $line);
if($line=='^C'){}
elseif(substr($line, 0, 1)!='[') continue;
$time = strtotime(substr($line, 1, 20));
@gloony
gloony / botwa.js
Last active March 10, 2024 19:33
WhatsApp Auto reply
let occurrences = [];
var lastMessage = null;
var inSend = false;
async function loopChat() {
if(inSend) return;
let elementsWithAriaLabel = document.querySelectorAll('[aria-label]');
console.log('Check new message');
elementsWithAriaLabel.forEach(async element => {
var ariaLabel = element.getAttribute('aria-label');