Skip to content

Instantly share code, notes, and snippets.

@likai24
likai24 / README.md
Created May 18, 2023 00:58 — forked from lopspower/README.md
Publish AAR to jCenter and Maven Central

Publish AAR to jCenter and Maven Central

Twitter

EDIT: You can find this same updated tutorial here -> Medium

Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central:

  1. I use "Android Studio" and I have this simple android lib that I would like to be available on maven: CircularImageView
@likai24
likai24 / DesmosPlayer.user.js
Created January 28, 2022 04:51 — forked from jason-woolf/DesmosPlayer.user.js
Programmatically control a Desmos graph
// ==UserScript==
// @name desmosPlayer
// @namespace http://github.com/jason-woolf
// @version 1.0.0
// @description Program a series of graph changes to create animation
// @author Jason Woolf (MathyJaphy)
// @match https://www.desmos.com/calculator*
// @grant none
// @run-at document-idle
// ==/UserScript==
@likai24
likai24 / wp-query-ref.php
Created July 25, 2017 03:13 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@likai24
likai24 / README.md
Created June 10, 2016 00:23 — forked from joyrexus/README.md
Node.js streams demystified

A quick overview of the node.js streams interface with basic examples.

This is based on @brycebaril's presentation, Node.js Streams2 Demystified

Overview

Streams are a first-class construct in Node.js for handling data.

Think of them as as lazy evaluation applied to data.

check process redis-server
with pidfile "/var/run/redis.pid"
start program = "/etc/init.d/redis-server start"
stop program = "/etc/init.d/redis-server stop"
if 2 restarts within 3 cycles then timeout
if totalmem > 100 Mb then alert
if children > 255 for 5 cycles then stop
if cpu usage > 95% for 3 cycles then restart
if failed host 127.0.0.1 port 6379 then restart
if 5 restarts within 5 cycles then timeout