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 rosbag | |
import rospy | |
from time import time | |
from geometry_msgs.msg import Pose, Transform, TransformStamped | |
from visualization_msgs.msg import Marker, MarkerArray | |
from pprint import pprint | |
now = round(time()) | |
bag = rosbag.Bag('bug.bag', 'w') |
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
# Automatically save updated `yarn.lock` file for dependabot PRs. | |
# This is necessary because dependabot doesn't support Yarn v2 yet: | |
# https://github.com/dependabot/dependabot-core/issues/1297 | |
# | |
# Note: We use the `pull_request_target` event due to GitHub security measures. | |
# It is important to ensure we don't execute any untrusted PR code in this context. | |
# See: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/ | |
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests | |
name: Dependabot |
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
FROM ubuntu | |
# install apt packages | |
RUN apt-get update \ | |
&& apt-get install -qq --no-install-recommends \ | |
gosu \ | |
man \ | |
sudo \ | |
&& rm -rf /var/lib/apt/lists/* |
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
#!/bin/bash | |
# if we are testing a PR, merge it with the latest master branch before testing | |
# this ensures that all tests pass with the latest changes in master. | |
set -eu -o pipefail | |
PR_NUMBER=${CI_PULL_REQUEST//*pull\//} | |
err=0 | |
if [ -z "$PR_NUMBER" ]; then |
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
#!/bin/bash -e | |
nullsha="0000000000000000000000000000000000000000" | |
maxsize=5 | |
maxbytes=$(( $maxsize * 1024 * 1024 )) | |
status=0 | |
# Read stdin for ref information | |
while read oldref newref refname; do | |
echo ref: $oldref $newref $refname |
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
#!/bin/bash -e | |
GITCMD="git" | |
NULLSHA="0000000000000000000000000000000000000000" | |
MAXSIZE="10" | |
MAXBYTES=$(( $MAXSIZE * 1024 * 1024 )) | |
EXIT=0 | |
# Read stdin for ref information | |
while read oldref newref refname; do |
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
FROM python:3.4.2 | |
ENV PYTHONUNBUFFERED 1 | |
# Create app directory | |
RUN mkdir /app | |
WORKDIR /app | |
# Install requirements | |
COPY requirements.txt /app/ | |
RUN pip install --upgrade pip \ |
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 Koa from 'koa'; | |
import Router from 'koa-router'; | |
const koa = new Koa(); | |
const app = new Router(); | |
app.get('/:name', async (ctx) => { | |
ctx.body = `Hello, ${ctx.params.name}!\n`; | |
}); |
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
Show hidden characters
{ | |
"plugins": [ | |
"transform-async-to-generator", | |
"transform-es2015-modules-commonjs" | |
] | |
} |
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
async function foo() { | |
const userId = 42; | |
const user = await User.findById(userId); | |
return user.name; | |
} | |
function foo() { | |
const userId = 42; |
NewerOlder