Skip to content

Instantly share code, notes, and snippets.

View andreescocard's full-sized avatar
🏠
Working from home

André Escocard andreescocard

🏠
Working from home
View GitHub Profile
@ripper234
ripper234 / MobileUADetector
Created May 31, 2012 09:46
Detect mobile user agent in Java
import java.util.regex.Pattern;
/**
* Detect mobile User Agent
*
* Adpated from http://detectmobilebrowsers.com/download/cs on 31/05/2012
*/
public class MobileUADetector {
private final static Pattern mobile_b = Pattern.compile("android.+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
@r37r0m0d3l
r37r0m0d3l / dataset from event.js
Created November 15, 2012 11:08
javascript get dataset from event
// as property
event.currentTarget.dataset.id
// as array element
event.currentTarget.dataset['id']
// jquery method
$(event.currentTarget).data('id')
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active June 6, 2024 01:03
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.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 20, 2024 23:48
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@bismarckjunior
bismarckjunior / anaconda.md
Last active August 26, 2019 20:21
Anaconda: Instalação e uso.

N|Solid

Anaconda

Anaconda é uma plataforma de ciência de dados para Python. Possibilita a instalação de diferentes versões da linguagem Python com a criação de ambientes de desenvolvimento específicos. Esse manual descreve como instalar e utilizar o Anaconda no Windows.

Instalação

Para instalar o Anaconda no Windows siga os passos:

  1. Faça download da versão atual do Anaconda no site: www.continuum.io/downloads
@besimhu
besimhu / create_init_sql.sh
Created January 12, 2018 04:05
a script use to recover data from innodb's frm and ibd file.
#!/bin/bash
#
# File: create_init_sql.sh
#
# Author: huxing1985@gmail.com
# blog: www.colorfuldays.org
#
# Purpose: This script is a part of an tool to recover mysql data from .frm and .idb file.
# This script is read the db data dir's file, generate an script to create the tables.
#
@lukecav
lukecav / functions.php
Created August 14, 2018 13:50
Enable revisions on products in WooCommerce
add_filter( 'woocommerce_register_post_type_product', 'wc_modify_product_post_type' );
function wc_modify_product_post_type( $args ) {
$args['supports'][] = 'revisions';
return $args;
}
@diego3g
diego3g / settings.json
Last active June 19, 2024 01:10
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active June 17, 2024 12:51
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
@11philip22
11philip22 / app.js
Last active May 2, 2024 12:47
Crack Monokai pro theme for Visual Studio Code or VSCodium
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("path"),require("child_process"),require("os"),require("fs")):"function"==typeof define&&define.amd?define(["path","child_process","os","fs"],t):"object"==typeof exports?exports["app"]=t(require("path"),require("child_process"),require("os"),require("fs")):e["app"]=t(e["path"],e["child_process"],e["os"],e["fs"])}(this,function(e,t,s,i){return(e=>{function t(i){if(s[i])return s[i].exports;var r=s[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var s={};return t.m=e,t.c=s,t.d=((e,s,i)=>{t.o(e,s)||Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:i})}),t.n=(e=>{var s=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(s,"a",s),s}),t.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),t.p="",t(t.s=1)})([(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={APP:{NAME:"MonokaiPro-VSCode",
THEMES:["Monokai Pro","Monokai Pro (F