Skip to content

Instantly share code, notes, and snippets.

@franzejr
franzejr / postgresql_adapter.rb
Last active December 26, 2021 17:25
Active Record 4.2.1 connection adapters - error: PG::InvalidParameterValue: ERROR: invalid value for parameter "client_min_messages": "panic" HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error. : SET client_min_messages TO 'panic'
# /Users/franzejr/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activerecord-4.2.1
# Changes in activerecord (4.2.1) lib/active_record/connection_adapters/postgresql_adapter.rb
# Enable standard-conforming strings if available.
def set_standard_conforming_strings
old, self.client_min_messages = client_min_messages, 'notice'
execute('SET standard_conforming_strings = on', 'SCHEMA') rescue nil
ensure
self.client_min_messages = old
end

Keybase proof

I hereby claim:

  • I am franzejr on github.
  • I am franzejr (https://keybase.io/franzejr) on keybase.
  • I have a public key ASCMzXBDFx3QIGQFLXwAhGd1hzHZCAfDbRNhQhIWtVPdkQo

To claim this, I am signing this object:

@franzejr
franzejr / introspection_query.graphql
Created October 18, 2018 14:01
GraphQL full Introspection query
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
@franzejr
franzejr / .rubocop.yml
Last active August 24, 2017 14:09
Rubocop config file
# see https://github.com/bbatsov/rubocop#configuration
# for info on how to configure rubocop
# see https://github.com/bbatsov/rubocop/blob/master/config/default.yml
# for default configuration
AllCops:
TargetRubyVersion: 2.3
Exclude:
- vendor/**/*
- notes.*
@franzejr
franzejr / package.json
Created August 30, 2016 03:55
Add eslint to your React Native Project
{
"name": "My Application",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"lint": "eslint --fix *.js"
},
"dependencies": {
"react": "15.3.1",
@franzejr
franzejr / gist:c2f59f7da7847b995ab1cb4e26dcdfab
Last active August 29, 2016 19:25
Remote Meetup new version
- Something like rails_admin
- List Meetups from Bigmarker (http://docs.bigmarker.com/)
- List Meetups from Anywhere
- Add a meetup manually
- Run a job every night and get all the meetups from bigmarker
- Upcoming remote meetups
- Featured remote meetups(it has a priority related to the others)
@franzejr
franzejr / FakeApi.js
Created July 7, 2016 13:40
Fake API JS
import axios from 'axios';
const BASE_URL = 'https://fakeApi/api';
const loginUrl = `${BASE_URL}/request_token`;
const instance = axios.create({
baseURL: `${BASE_URL}`,
});
import React from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
@franzejr
franzejr / TabView.js
Last active July 7, 2016 13:02
TabView
import React, { PropTypes } from 'react';
import { StyleSheet, View } from 'react-native';
import Button from 'react-native-button';
import { Actions } from 'react-native-router-flux';
const contextTypes = {
drawer: React.PropTypes.object,
};
const propTypes = {
@franzejr
franzejr / SimpleDrawer.js
Created July 7, 2016 12:44
SimpleDrawer using Drawer React Native
import React, { Component } from 'react';
import Drawer from 'react-native-drawer';
import { DefaultRenderer } from 'react-native-router-flux';
import TabView from '../TabView/TabView';
export default class SimpleDrawer extends Component {
static propTypes = {
navigationState: React.PropTypes.object,
onNavigate: React.PropTypes.function,
}