https://moox.io/blog/keep-in-sync-git-repos-on-github-gitlab-bitbucket/
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
| # content provided as part of thread here: https://www.reddit.com/r/aws/comments/cffmxr/how_do_you_strip_the_attachments_from_aws_sessns/ | |
| from email.parser import BytesParser | |
| from email import policy | |
| import os | |
| # event will be JSON from SES incoming email rule - NOT an S3 PUT event | |
| def lambda_handler(event, context): | |
| try: | |
| ses_mail = event['Records'][0]['ses']['mail'] |
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
| /* | |
| MIT No Attribution | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
| software and associated documentation files (the "Software"), to deal in the Software | |
| without restriction, including without limitation the rights to use, copy, modify, | |
| merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
| permit persons to whom the Software is furnished to do so. |
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
| pragma solidity ^0.4.19; | |
| /** | |
| @title HODL | |
| A smart contract for real HOLDERS, all ETH received here can be withdraw a year | |
| after it was deposited. | |
| */ | |
| contract HODL { |
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
| dialog { | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; | |
| right: auto; | |
| padding: 30px; | |
| transform: perspective(500px) translate(-50%, -50%); | |
| background: linear-gradient(to bottom, #FFF, #F4F4F4) #FFF; | |
| border: none; | |
| border-radius: 3px; |
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
| // @flow | |
| // Helper to extract inferred return type of a function | |
| type _ExtractReturn<B, F: (...args: any[]) => B> = B; | |
| type ExtractReturn<F> = _ExtractReturn<*, F>; | |
| // Use constants as normal | |
| const AGE = 'AGE'; | |
| const NAME = 'NAME'; | |
| // only need to provide types for arguments in action-creators |
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 MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue.js'; | |
| const WHITELIST = ['UIManager']; | |
| const NOOP = () => { }; | |
| let queue = []; | |
| let now = 0; | |
| export default { | |
| start() { | |
| MessageQueue.spy(msg => { |
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
| // @flow | |
| import React from 'react'; | |
| import styled from 'styled-components'; | |
| type GlobalCssValues = 'initial' | 'inherit' | 'unset'; | |
| type WrapValue = 'nowrap' | 'wrap' | 'wrap-reverse' | GlobalCssValues; | |
| type JustifyValue = | |
| | 'center' |
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
| // Why the Hipsters Reduce Everything! | |
| // Map implementation | |
| import R from 'ramda' | |
| const map = (f, data) => | |
| R.reduce((xs, x) => { | |
| return [...xs, f(x)] | |
| }, [], data) |
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
| const R = require('ramda') | |
| const colors = ['green', 'blue', 'red'] | |
| const notEmpty = R.compose(R.not, R.isEmpty) | |
| const minLength = a => b => R.length(b) > a | |
| const hasPresetColors = x => R.indexOf(x, colors) !== -1 | |
| const input = { | |
| id: 1, | |
| userName: 'Random', |