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
type Site { | |
id: ID! | |
label: String | |
# shrug emoji | |
owner: User @deprecated(reason: "Use `pointOfContact`.") | |
pointOfContact: User | |
# The entity responsible for the payment of the site | |
payerWorkspace: Workspace! @deprecated(reason: "Use `ownerWorkspace`.") | |
ownerWorkspace: Workspace! | |
regionLabel: String |
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 updateRecords(records, id, prop, value) { | |
/** | |
create a copy of records so you dont mess with the original object (this is called a spread operator.) | |
It's good to get in the habit of practicing functional javascript | |
**/ | |
const updatedRecords = {...records} | |
if (value === '') { | |
delete updatedRecords[id][prop]; | |
} |
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 eventFireCapterra() { | |
var capterra_vkey = 'YOUCAPTERRAKEY', | |
capterra_vid = 'ID', | |
capterra_prefix = (('https:' == document.location.protocol) | |
? 'https://ct.capterra.com' : 'http://ct.capterra.com'); | |
var ct = document.createElement('script'); | |
ct.type = 'text/javascript'; | |
ct.async = true; | |
ct.src = capterra_prefix + '/capterra_tracker.js?vid=' | |
+ capterra_vid + '&vkey=' + capterra_vkey; |
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
window.drift.on('ready', function() { | |
var urlParams = new URLSearchParams(window.location.search); | |
var glicValue = urlParams.get('glic'); | |
if (glicValue) { | |
drift.api.setUserAttributes({ | |
glic: glicValue | |
}) | |
} | |
}) |
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
<?php | |
namespace craft\wufooformsubmission\controllers; | |
use craft\wufooformsubmission\Plugin; | |
use Craft; | |
use craft\web\Controller; | |
use craft\web\Request; | |
use yii\web\Response; | |
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
<?php | |
/** | |
* @link https://craftcms.com/ | |
* @copyright Copyright (c) Pixel & Tonic, Inc. | |
* @license https://craftcms.com/license | |
*/ | |
namespace craft\wufooformsubmission\controllers; | |
use craft\wufooformsubmission\Plugin; | |
use Craft; |
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
var linkBuilder = angular | |
.config(function($stateProvider, $urlRouterProvider){ | |
$stateProvider | |
.state('login', { | |
url: '/login', | |
controller: 'authController as authctrl', | |
templateUrl: 'pages/login.html', | |
resolve: { | |
requireNoAuth: function($state, Auth){ | |
return Auth.$requireAuth().then(function(auth){ |
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
Checkers Pseudo Code | |
Game settings | |
-Team turn | |
-If either team's checker piece array == 0, game over | |
-Start game, layout checker pieces | |
Tile object | |
-Attributes: | |
-Location on 64 tile grid: [1,1],[1,2], [1,3]... etc |
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
def self.incomplete | |
where(completed_on: nil) | |
end | |
def self.active | |
incomplete.where("end_date >= ?", Date.today) | |
end |
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
<% @user.goals.each do |goal| %> | |
<% if goal.completed? != true && goal.end_date > Date.today %> |
NewerOlder