This file contains 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
SELECT | |
( | |
IF ( | |
( | |
SELECT COUNT(*) | |
FROM `people_person_contacts` | |
WHERE `from_person_id` = 12895 AND `to_person_id` = `people_person`.`id` | |
), | |
1, | |
IF ( |
This file contains 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
SELECT DISTINCT | |
`people_person`.`id`, | |
`people_person`.`date_created`, | |
`people_person`.`date_modified`, | |
`people_person`.`access`, | |
`people_person`.`thumbnail`, | |
`people_person`.`description`, | |
`people_person`.`short_description`, | |
`people_person`.`title`, | |
`people_person`.`first_name`, |
This file contains 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
CREATE TABLE IF NOT EXISTS cb_organizations ( | |
company_name varchar(65535), | |
domain varchar(65535), | |
country_code varchar(65535), | |
state_code varchar(65535), | |
region varchar(65535), | |
city varchar(65535), | |
status varchar(65535), | |
short_description varchar(65535), | |
category_list varchar(65535), |
This file contains 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 datetime | |
D1 = datetime.date.today() | |
sqlscript = ''' | |
SELECT | |
p.PeopleId, | |
p.FamilyId, | |
p.Name2, | |
p.FirstName, | |
p.PreferredName, |
This file contains 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
-- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64) | |
-- | |
-- Host: localhost Database: ggrcdev | |
-- ------------------------------------------------------ | |
-- Server version 5.5.49-0ubuntu0.14.04.1 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
This file contains 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
; (function (global, define) { define('module-name', function (require, exports, module) { | |
// CommonJS style code here | |
/*! | |
* UMD/AMD/Global context Module Loader wrapper | |
* based off https://gist.github.com/tejacques/202a8f2d198ddd54a409 | |
* | |
* This wrapper will try to use a module loader with the | |
* following priority: | |
* |
This file contains 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
let wrappable = { | |
'object': true, | |
'function': true | |
}; | |
let autowrapSymbol = '@@autowrap'; | |
function wrap(fn) { | |
console.log('wrapping function call'); | |
let wrapped = function() { |
This file contains 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
/** | |
* I'd like to have a router with semantics that work like this | |
* Pros: | |
* - Named routes | |
* - Type Safe routing (with TypeScript) | |
* - Links are not strings so refactoring/changing them is trivial | |
* - Relative links are possible | |
* | |
* Cons: | |
* - Verbose links |
This file contains 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 * as React from 'react'; | |
import { Component } from 'react'; | |
export default function HOCBaseRender<Props, State, ComponentState>( | |
Comp: new() => Component<Props & State, ComponentState>) { | |
return class HOCBase extends Component<Props, State> { | |
render() { | |
return <Comp {...this.props} {...this.state}/>; | |
} | |
} |
This file contains 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
function identity(x) { | |
return x; | |
} | |
function fp<T1, T2> ( | |
transform: (x: T1) => T2 | |
): (x: T1) => T2; | |
function fp<T1, T2, T3> ( | |
transform1: (x: T1) => T2, |
OlderNewer