Skip to content

Instantly share code, notes, and snippets.

View dmurawsky's full-sized avatar

Daniel Murawsky dmurawsky

View GitHub Profile
@dmurawsky
dmurawsky / index.js
Last active February 4, 2024 17:20
How to make a page full height in Next.js
const FullHeightPage = () => (
<div>
Hello World!
<style global jsx>{`
html,
body,
body > div:first-child,
div#__next,
div#__next > div {
height: 100%;
@dmurawsky
dmurawsky / upgrade_expo.md
Last active February 10, 2018 16:41
Upgrade Expo
  1. Upgrade Expo: npm i -g exp.

  2. Open Expo XDE & start a new project.

  3. Copy the expo, react, & react-native versions from the package.json file into your current project.

  4. Upgrade any other packages that might be stale. Especially things like react-navigation, react-native-elements, or any other Expo-specific packages.

  5. Delete node_modules folder, package-lock.json, and/or yarn.lock.

@dmurawsky
dmurawsky / center.css
Created February 19, 2018 02:30
How to center with table and cell
.center-table {
height: 100%;
width: 100%;
display: table;
}
.center-cell {
position: relative;
display: table-cell;
vertical-align: middle;
text-align: center;
@dmurawsky
dmurawsky / handler.js
Last active March 11, 2018 15:24
example lex lambda
exports.availability = (event, context, cb) => {
context.callbackWaitsForEmptyEventLoop = false;
console.log(event, context);
return cb(null, {
dialogAction: {
type: "Close",
fulfillmentState: "Fulfilled",
message: {
contentType: "PlainText",
content: "Response from availability lambda"
@dmurawsky
dmurawsky / my.code-snippets
Last active June 10, 2018 17:40
VS Code snippets
{
"Print to console": {
"scope": "javascript,typescript",
"prefix": "log",
"body": [
"console.log('$1', $2);"
],
"description": "Log output to console"
},
"prettier": {
@dmurawsky
dmurawsky / package.json
Created June 29, 2018 21:40
Now Deploy Script
{
"scripts": {
"deploy": "now -e EXAMPLE_API_KEY=@example-api-key && now alias `pbpaste` example.com && now scale `pbpaste` 1 1"
}
}
{
"isbn": "pg1017",
"title": "The Soul of Man under Socialism",
"contributors": [
"Oscar Wilde"
],
"flags": {
"pages": false,
"noCover": false
},
{
"id": "1818",
"uid": "207",
"category": "11",
"event_hash": "",
"comments": "undefined",
"stamp": "1536349687",
"created": "1536349687",
"longitude": "-82.51255529236315",
"latitude": "27.33067613370507",
{
"answer": "333",
"field_id": "22",
"label": "Service Time",
"position": "3",
"template": {
"activity_category_id": "11",
"alerts": [],
"created": "1524064596",
"field_type": "decimal",
{
"id": "18",
"name": "Smiley Test Media",
"created": "1531745959",
"updated": "1531745959",
"status": "active",
"act_ids": "13,13,13,13,12,12,12,12,14,14,14,14",
"activities": [
{
"id": "12",