This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Company application", | |
"fields": [ | |
{ | |
"component": "section", | |
"title": "Company Details", | |
"description": "Section for company details.", | |
"name": "companyDetails", | |
"fields": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"value": 13590, | |
"label": "[13590] Glass Dealers & Glaziers" | |
}, | |
{ | |
"value": 90089, | |
"label": "[90089] Advertising Sign Cos.–Outdoor" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"value": 1860, | |
"label": "[1860] Abrasive Paper or Cloth Preparation (National)" | |
}, | |
{ | |
"value": 1748, | |
"label": "[1748] Abrasive Wheel Mfg. & Drivers (National)" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem "rack-cors" | |
gem "pundit" | |
gem "graphql" | |
gem "friendly_id", "~> 5.2.4" | |
gem "awesome_print" | |
gem "strong_migrations" | |
gem "httparty" | |
gem "name_of_person" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.eager_load! | |
ApplicationRecord.subclasses.reject { |m| m.name =~ /HABTM/ || m.name =~ /Pg/ }.each do |model| | |
begin | |
model_relation = model.reflect_on_all_associations.map{ |r| [ r.foreign_key, r.name ] }.to_h | |
columns = model.columns.map { |c| [ c.name, c.type ] }.to_h | |
model_relation.keys.each { |k| columns.delete(k) } | |
puts "rails g factory_bot:model #{model.name} #{columns.map { |k, v| "#{k}:#{v}" }.join(' ')}" | |
`rails g factory_bot:model #{model.name} #{columns.map { |k, v| "#{k}:#{v}" }.join(' ')}` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { connect } from 'react-redux'; | |
import { follow } from '../actions/follow'; | |
import { fetchUser } from '../actions/users'; | |
import Navbar from '../components/Navbar'; | |
import Profile from '../components/Profile'; | |
function mapStateToProps(state, { match: { params } }) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
l = log --pretty=format:\"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate | |
g = log --oneline --decorate --graph | |
s = status -sb | |
co = checkout | |
b = branch -avv | |
ll = log --pretty=format:\"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate --numstat | |
lds = log --pretty=format:\"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate --date=short | |
ld = log --pretty=format:\"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]\" --decorate --date=relative | |
lc = log master.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = require('util'); | |
var events = require('events'); | |
var Promise = require('bluebird'); | |
var request = Promise.promisify(require('request')); | |
var CreateFacebookTestUser = function() { | |
events.EventEmitter.call(this); | |
}; | |
util.inherits(CreateFacebookTestUser, events.EventEmitter); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TransliterationUtilities { | |
var $resultsPerPage; | |
function doTransliterationSearch($searchString, $page, $resultsPerPage){ | |
$ans = array(); | |
$normalized = $this->prepareText($searchString); | |
if (strlen($normalized) == 0) return $ans; | |
if (strlen($normalized) > 255) | |
$normalized = substr($normalized, 0, 200); |