Skip to content

Instantly share code, notes, and snippets.

@dobrowins
dobrowins / AndroidManifest.xml
Created February 7, 2018 08:14
Detecting foreground activity from service
<application>
<service
android:label="BLABLABLA"
android:name=".service.WindowChangeDetectingService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService"/>
</intent-filter>
<meta-data
android:name="android.accessibilityservice"
@fevangelou
fevangelou / my.cnf
Last active March 28, 2024 11:55
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active March 28, 2024 11:54
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 11:53
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@dmancloud
dmancloud / customize-your-terminal-on-macos-like-a-pro.md
Last active March 28, 2024 11:53
Customize Your Terminal On MacOS Like A Pro

Customize Your Terminal On MacOS Like A Pro

Customize your terminal using iTerm2, oh-my-zsh and powerlevel10k works on both Macbook Intel and Macbook M1.

Install Brew

The Missing Package Manager for macOS

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install iTerm2

iTerm2 has better color fidelity than the built in Terminal, so your themes will look better.

@fuyuanli
fuyuanli / dmm.com
Last active March 28, 2024 11:52
dmm.com
document.cookie = "cklg=welcome;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=.dmm.com;path=/";
document.cookie = "cklg=welcome;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=.dmm.com;path=/netgame/";
document.cookie = "cklg=welcome;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=.dmm.com;path=/netgame_s/";
document.cookie = "ckcy=1;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=.dmm.com;path=/";
document.cookie = "ckcy=1;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=.dmm.com;path=/netgame/";
document.cookie = "ckcy=1;expires=Sun, 09 Feb 2019 09:00:09 GMT;domain=.dmm.com;path=/netgame_s/";
@rg3915
rg3915 / nome_cap.md
Last active March 28, 2024 11:52
Colocar a primeira letra de cada palavra em maiúsculo, exceto em preposições 'da', 'de', 'di', 'do', 'du', 'para' ... - nome - pyladies - python

Tratar nomes com preposições

PyLadiesSP

Objetivo: colocar a primeira letra de cada palavra em maiúsculo, exceto em preposições 'da', 'de', 'di', 'do', 'du', 'para' ...

Texto: minicurso de python para mulheres

Resultado esperado: Minicurso de Python para Mulheres

@taoyuan
taoyuan / generate_self_signed_certification.md
Last active March 28, 2024 11:50
Generation of a Self Signed Certificate

Generation of a Self Signed Certificate

Generation of a self-signed SSL certificate involves a simple 3-step procedure:

STEP 1: Create the server private key

openssl genrsa -out cert.key 2048

STEP 2: Create the certificate signing request (CSR)

openssl req -new -key cert.key -out cert.csr