Skip to content

Instantly share code, notes, and snippets.


jose josescasanova

Block or report user

Report or block josescasanova

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
josescasanova / wordpress-change-domain-migration.sql
Created Feb 14, 2019 — forked from chuckreynolds/wordpress-change-domain-migration.sql
Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: always backup your database. __STEP2: change the ‘’ and ‘’ variables to your own. __STEP3: make sure your databa…
View wordpress-change-domain-migration.sql
SET @oldsite='';
SET @newsite='';
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);
josescasanova /
Created Apr 30, 2018 — forked from DanHerbert/
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.


This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

View gist:01c0920cac43bcbfd2d3865981b56a4a
If you find the following useful my donation address is: aEgoFC75sP78gT55em1QYcL8DNYZ78ewJ5
1. Go here:
2. Click: "Request Spot Instances"
3. Request type: "Request and Maintain"
4. Choose how ever many servers/vcpus you want in the "Target Capacity" section.
View gist:b6709a0296820f1d68e3d562585dd622
If you find the following useful my donation address is: aEgoFC75sP78gT55em1QYcL8DNYZ78ewJ5
1. Go here:
2. Click: "Request Spot Instances"
3. Request type: "Request and Maintain"
4. Choose how ever many servers/vcpus you want in the "Target Capacity" section.

Who uses Turing Slack?

Turing has a large community of people who use Slack: mentors, teachers, guests, students, and alumni. Members should be mindful of other people's involvement in the Turing Slack community. Many mentors and guests are in different time zones, and most students need their sleep when they can get it (see: night owls or early birds). Please be aware of your local time and other users' local time when you are sending a message that will notify other members of the message. Most users have phone and/or email notifications (@channel (see below) and direct message) turned on.

When Should I @channel?

Almost never. Especially in the community channel. Here are things to ask yourself before you send out a message using @channel:

  • Is this message important to everyone in this channel?
  • Does this message directly impact everyone in this channel?
  • Will this message wake anyone up
View gist:30c1165220370f777b714993843cbae7

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.


Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
josescasanova /
Created Jan 20, 2017 — forked from LeCoupa/
Bash CheatSheet for UNIX Systems
# Name: Bash CheatSheet for Mac OSX
# A little overlook of the Bash basics
# Usage:
# Author: J. Le Coupanec
# Date: 2014/11/04

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

josescasanova / my-component.spec.js
Created Aug 11, 2016 — forked from thevangelist/my-component.spec.js
The only React.js component test you'll ever need (Enzyme + Chai)
View my-component.spec.js
import React from 'react';
import { shallow } from 'enzyme';
import MyComponent from '../src/my-component';
const wrapper = shallow(<MyComponent/>);
describe('(Component) MyComponent', () => {
it('renders without exploding', () => {
View gist:ef1045e74180d7f7cab4849cd7e94bae
const foo: {bar: boolean} = {bar: true};
if (foo.baz) {
You can’t perform that action at this time.