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
const GET_POSTS = gql` | |
query GetPosts { | |
posts { | |
edges { | |
node { | |
id | |
title | |
author { | |
node { | |
firstName |
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 React, { useState, useContext, useRef } from 'react' | |
import { DatePicker } from 'material-ui-pickers' | |
import { MuiPickersContext } from 'material-ui-pickers' | |
export default function DateMultiPicker({ | |
value, | |
onChange, | |
labelFunc, | |
format, | |
emptyLabel, |
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
const conn = new jsforce.Connection({ | |
// you can change loginUrl to connect to sandbox or prerelease env. | |
loginUrl: 'https://example.my.salesforce.com/' | |
}) | |
conn.login(username, password, function (err, userInfo) { | |
if (err) { | |
return console.error(err) | |
} | |
// Now you can get the access token and instance URL information. | |
// Save them to establish connection next time. |
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
.ui-accordion { | |
border-radius: 2px; | |
-webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2); | |
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 1px 5px 0 rgba(0,0,0,0.12), 0 3px 1px -2px rgba(0,0,0,0.2); | |
} | |
.ui-accordion .ui-header { | |
background: none; | |
background-color: #fff; | |
border: none; |
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
// Must install ImageMagick first | |
http://www.imagemagick.org/script/index.php | |
//This compresses a jpg with no visible loss of quality. Add in your own file names for target.jpg and result.jpg | |
convert -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% target.jpg result.jpg | |
// This does the same as above but to an entire folder (will overwrite original files): | |
mogrify -strip -interlace Plane -sampling-factor 4:2:0 -quality 85% *.jpg | |
//This does the same thing but to all subfolders as well (Be careful with this one it will overwrite all original files) |
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 () { | |
let thisInputID, thisPickerID; | |
$('.datepicker').pickadate({ | |
//Other options can go here | |
onOpen: function() { | |
//Get ID for input and this particular picker | |
thisInputID = `#${$(this.$node.context).attr('id')}`; | |
thisPickerID = `${thisInputID}_root`; | |
}, | |
onClose: function() { |