Skip to content

Instantly share code, notes, and snippets.

View Nick-t-go's full-sized avatar

Nick Toscano Nick-t-go

  • Brooklyn, NY
View GitHub Profile
@Nick-t-go
Nick-t-go / changeGroupToGroups.rb
Created April 6, 2018 19:34
Migrate Integer to array of integers Rails ActiveRecord
class ChangeGroupType < ActiveRecord::Migration[5.0]
def up
add_column :messages, :groups, :integer, array: true
Message.find_each do |msg|
msg.groups << msg.group
msg.save!
end
remove_column :messages, :group, :integer
end
@Nick-t-go
Nick-t-go / MuiTooltip_global_overide_example.js
Created November 9, 2018 20:23
Adjusting Font Size of Material-UI Tooltip Globally Example
const theme = createMuiTheme({
palette: {
primary: { main: '#FAFAFA' },
secondary: lightBlue
},
overrides: {
MuiTooltip: {
tooltip: { // Name of the component ⚛️ / style sheet
fontSize: 12, // Some CSS
},
@Nick-t-go
Nick-t-go / listItemSelectedExample.js
Created November 20, 2018 18:26
Material UI example for adjusting selected styling on list item.
const styles = theme => ({
selected: {
boxShadow: `18px 0px 0 #6699FF inset`,
backgroundColor: `rgba(102,153,255,0.2) !important`
}
});
render(){
return (
<div key={msg.id}>