Skip to content

Instantly share code, notes, and snippets.

r-peppa-pig /
Created Jan 25, 2020 — forked from eldondevcg/
Cross account bucket access for IAM roles


This is a little tricky, because it requires several different moving parts, specifically,

  • the lambda task that you want to execute the copy must have IAM access to the bucket in the other account. This is not something that was obvious to me to begin with, although my use case was more complicated.
  • the bucket policy on the destination account must be set to permit your lambda function to write to that bucket. For my special use cases, I have to upload a new bucket policy daily to the receiving buckets. Alternatively, the destination accounts could probably give your a cross-account IAM role to upload the bucket policy yourself.
  • You will likely want to write your objects with the bucket-owner-full-control acl, otherwise, the bucket owner may not be able to download them.
saeedvir / ApiDataResponse.php
Last active Jan 25, 2020
Standard API Response in PHP
View ApiDataResponse.php
* Standard API Response in PHP
* @author Saeedvir [
* 'email' => '',
* 'telegram' => ''
* ]
* @usage :
HugsLibRecordKeeper / output_log.txt
Created Jan 25, 2020
Rimworld output log published using HugsLib
View output_log.txt
This file has been truncated, but you can view the full file.
Log uploaded on Saturday, January 25, 2020, 1:56:13 PM
Loaded mods:
Core: (no assemblies)
疯狂技能: 0Harmony(, MadSkills(
0012稳定品质: static_quality_plus(
0022精心准备: 0Harmony(, EdBPrepareCarefully(
0024RuntimeGC: RuntimeGC(
0065RT武器: (no assemblies)
HugsLib[ov:6.1.1]: 0Harmony(, HugsLib(av:,fv:6.1.1)
View abstract_1.dart
// 抽象クラスをインスタンス化はできません。
void main() {
var shape = Shape();
abstract class Shape {
double area();
KBiswas98 / Next slide & start slide & end slide
Created Jan 25, 2020
react-native slider/carousel using scrollView
View Next slide & start slide & end slide
_goToNextPage = () => {
if (
ActivePortionOfScrollView >
Dimensions.get('window').width * (NumberOfSlide - 1)
ActivePortionOfScrollView = -Dimensions.get('window').width;
ActivePortionOfScrollView =
ActivePortionOfScrollView +
Dimensions.get('window').width +
View Ubuntu server 18.04 initial user setup
# Add user
adduser ubuntu
# Set to super user
usermod -aG sudo ubuntu
# Switch user
sudo su ubuntu
# Add .ssh to ubuntu user
faruk09 / Sticky menu on scroll
Last active Jan 25, 2020
Sticky menu on scroll
View Sticky menu on scroll
<div class="logo">OLD, OUTDATED STICKY MENU METHOD</div>
<div class="intro">Our company is crap! Don't buy our stuff!</div>
<div class="menu">Menu goes here - home - links - blah blah</div>
<div class="content">Main Content Goes here</div>
.menu-padding {padding-top:40px;}
.sticky {position:fixed; top:0;}
SparshaD / PY0101EN-5.2_API_2.ipynb
Created Jan 25, 2020
Created on Cognitive Class Labs
View PY0101EN-5.2_API_2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:0fd9082a8ae6452fa7abbfd264412fdc
const info = require('util').debuglog('INFO')
const warn = require('util').debuglog('WARN')
info('hello %s %d', 'lambda', 1) // INFO 244: hello lambda 1
warn('hello %s %d', 'lambda', 1) // WARN 244: hello lambda 1
You can’t perform that action at this time.