Skip to content

Instantly share code, notes, and snippets.

View FRodrigues21's full-sized avatar
🎯
Hmmmmm

Francisco Rodrigues FRodrigues21

🎯
Hmmmmm
  • Reachdesk
  • Portugal
View GitHub Profile
@scaryguy
scaryguy / change_primary_key.md
Last active July 15, 2024 16:57
How to change PRIMARY KEY of an existing PostgreSQL table?
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of  your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
@ramonsmits
ramonsmits / gist:7563502
Created November 20, 2013 13:52
Example of Mandrill webhook JSON data.
[
{
"event": "send",
"msg": {
"ts": 1365109999,
"subject": "This an example webhook message",
"email": "example.webhook@mandrillapp.com",
"sender": "example.sender@mandrillapp.com",
"tags": [
"webhook-example"
@mlanett
mlanett / rails http status codes
Last active July 22, 2024 09:14
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@creationix
creationix / instructions.md
Last active February 6, 2020 01:59
Installing Ubuntu Gnome 14.10 on Late 2013 Retina Macbook Pro 13"

Installing Ubuntu on a Mac

Desktop linux has been late to the show with high dpi support, but gnome seems to be leading the pack. I decided to try again. It's worked fairly well out of the box. Here are my steps if anyone wishes to repeat.

Booting into Ubuntu Live Image

@erikras
erikras / FieldArraysForm.js
Created November 14, 2016 22:19
Example showing how to use a formValueSelector on an individual array item
/**
The following can replace the file in the Field Arrays example
(https://github.com/erikras/redux-form/tree/master/examples/fieldArrays) to demonstrate this functionality.
**/
import React from 'react'
import { connect } from 'react-redux'
import { Field, FieldArray, reduxForm, formValueSelector } from 'redux-form'
import validate from './validate'
@fdidron
fdidron / App.js
Last active April 11, 2023 13:54
React Router v4 Auth
//Usage
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Route from './AuthRoute';
import Login from './Login';
import Private from './Private';
export default () =>
<Router>
@lantrix
lantrix / brew-downgrade.sh
Last active May 10, 2023 08:04
Install an older version with Brew as @ Jan 2021
# remove latest
brew uninstall terraform
# create a local tap for old version - The brew tap-new <org>/<repo> does not have to be an actual repo.
brew tap-new lantrix/an-older-terraform
#extract old version forumla
brew extract --version 0.13.5 terraform lantrix/an-older-terraform
# Install old formula