Skip to content

Instantly share code, notes, and snippets.

View karson's full-sized avatar
🎯
Focusing

Karson karson

🎯
Focusing
View GitHub Profile
@karson
karson / disable_pin.sh
Created May 24, 2018 21:50
Disable SIM card PIN code
#utilitarios para desabilitar o pin no SIM
gsmuitls
sudo apt-get install gsm-utils
sudo gsmctl -d /dev/ttyACM0 -o unlock sc all 1234
here 1234 is actually your SIM Card PIN to be removed.
qmicli
sudo apt-get install libqmi-utils
sudo qmicli -d /dev/cdc-wdm0 --dms-uim-get-pin-status
sudo qmicli -d /dev/cdc-wdm0 --dms-uim-set-pin-protection=PIN,disable,1234
sudo qmicli -d /dev/cdc-wdm0 --dms-uim-get-pin-status
@karson
karson / wordpress-change-domain-migration.sql
Last active May 24, 2018 21:48 — forked from chuckreynolds/wordpress-change-domain-migration.sql
Changing domains on a WordPress site with #sql
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite);
Organization name: leexij@gmail.com
Serial Key: eNrzzU/OLi0odswsqslJTa3IzHJIz03MzNFLzs+tMTQyNrcwsTQyAIEa5xpDAIFxDy8k
@karson
karson / setup-mysql.sh
Created March 15, 2018 18:45 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@karson
karson / desligar-tela.sh
Created March 14, 2018 12:16
Desliga a tela pela linha de comando no #linux #bash
xset dpms force off
@karson
karson / pre-vhost.conf
Created March 10, 2018 16:00
Bloquear xmlrpc wordpress #buteforce
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>
@karson
karson / woo-checkout-fields.php
Created March 7, 2018 15:33 — forked from bavington/woo-checkout-fields.php
Reorder Checkout Fields in WooCommerce
// Reorder Checkout Fields
add_filter('woocommerce_checkout_fields','reorder_woo_fields');
function reorder_woo_fields($fields) {
$fields2['billing']['billing_email'] = $fields['billing']['billing_email'];
$fields2['billing']['billing_first_name'] = $fields['billing']['billing_first_name'];
$fields2['billing']['billing_last_name'] = $fields['billing']['billing_last_name'];
$fields2['billing']['billing_country'] = $fields['billing']['billing_country'];
$fields2['billing']['billing_address_1'] = $fields['billing']['billing_address_1'];
$fields2['billing']['billing_address_2'] = $fields['billing']['billing_address_2'];
@karson
karson / dominio.js
Created October 27, 2017 03:01
bloquear dominios reservados whmcs
/*
Criado por Victor Hugo Scatolon de Souza
CompuLabs.com.br
*/
$(document).ready(function() {
// Aqui você coloca o IP de seus nameservers (OBS.: TEM QUE SER O IP MESMO)
// Você pode colocar vários IP de várias revendas, basta adicionar uma virgula, ex: var meusip = ['127.0.0.1', '192.0.0.1'];
var meusip = ['127.0.0.1'];
// Mensagem mostrada quando o dominio não é permitido
@karson
karson / comoSerChatoNowhatsapp.js
Created October 18, 2017 15:38 — forked from callmeloureiro/comoSerChatoNoWhatsapp.js
Como fazer alguém te responder no whatsapp
var counter = 0;
var i = setInterval(function(){
window.InputEvent = window.Event || window.InputEvent;
var d = new Date();
var event = new InputEvent('input', {bubbles: true});
var textbox = document.querySelector('#main > footer > div.block-compose > div.input-container > div.pluggable-input.pluggable-input-compose > div.pluggable-input-body.copyable-text.selectable-text');
// Mensagem que será enviada
textbox.textContent = "Me responde!";
@karson
karson / .htaccess
Last active August 27, 2018 09:46
redirect https #cpanel #hosting
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example\.com/$1 [R,L]