Skip to content

Instantly share code, notes, and snippets.

View omariosouto's full-sized avatar

Mario Souto omariosouto

View GitHub Profile
@humbertodias
humbertodias / gist:3138cf7753b6814d37b606764fb9efaf
Created March 19, 2017 13:06
Exporting Mysql server to internet
# tunnel online
ngrok tcp 3306
# connection
user=root
pass=techne
host=0.tcp.ngrok.io
port=16799
mysql -u$user -h$host -P$port -p$pass
@rowlandekemezie
rowlandekemezie / ajaxWithReduxSaga.js
Last active January 11, 2024 06:46
A basic implementation of AJAX with redux-saga
const { applyMiddleware, createStore } = Redux;
const createSagaMiddleware = ReduxSaga.default;
const { put, call } = ReduxSaga.effects;
const { takeLatest } = ReduxSaga;
const { connect, Provider } = ReactRedux;
// GitHub API
const gitHubApi = (username) => {
return fetch(`https://api.github.com/users/${username}`)
.then(response => {
@renanlara
renanlara / contact-form7.css
Last active February 29, 2016 17:25
Contact Form 7 - Customizar mensagens de erros
body input[type=text].wpcf7-not-valid,
body input[type=email].wpcf7-not-valid,
body input[type=tel].wpcf7-not-valid,
body textarea.wpcf7-not-valid {
border: 1px solid #ec3c06;
}
body span.wpcf7-not-valid-tip {
background: none;
border: none;
@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@renanlara
renanlara / compilador-sass.md
Last active November 25, 2015 12:39
Compilador SASS

Linux / Ubuntu

  • Instale o Ruby > $ sudo apt-get install ruby-full
  • Instale o SASS > $ sudo su -c "gem install sass"
  • Instale o Compass -> $ sudo gem install compass

Windows

@renanlara
renanlara / myphpadmin.sql
Last active November 15, 2016 15:06
Atualizar as URLs no Banco de Dados do WordPress
UPDATE wp_options SET option_value = replace(option_value, 'http://url-antiga.com.br', 'http://url-nova.com.br') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://url-antiga.com.br','http://url-nova.com.br');
UPDATE wp_posts SET post_content = replace(post_content, 'http://url-antiga.com.br', 'http://url-nova.com.br');
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).