Skip to content

Instantly share code, notes, and snippets.

View johnnybridges's full-sized avatar

Johnny Bridges johnnybridges

View GitHub Profile
@delemach
delemach / slackNotify.js
Last active November 1, 2018 18:41 — forked from turret-io/slackNotify.js
Parse SNS notification from Elastic Beanstalk and publish to Slack channel
var http = require('https');
var querystring = require('querystring');
// set the post request options
var reqOptions = {
hostname: 'hooks.slack.com',
port: 443,
path: '/services/YOUR/SLACK/HOOK_HERE',
method: 'POST'
};
@marty-wang
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active February 13, 2024 07:34
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@terranware
terranware / snsToSlack.js
Last active March 7, 2024 14:47
AWS Lambda function to Slack Channel hookup
var https = require('https');
var util = require('util');
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, 2));
console.log('From SNS:', event.Records[0].Sns.Message);
var postData = {
"channel": "#aws-sns",
"username": "AWS SNS via Lamda :: DevQa Cloud",
@vgeshel
vgeshel / function.js
Last active February 9, 2022 09:19
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@janikvonrotz
janikvonrotz / Unattended Encrypted Incremental Backup to Amazon S3.md
Last active May 8, 2020 08:00
Ubuntu: Unattended Encrypted Incremental Backup to Amazon S3#AmazonAWS#Markdown

Introduction

For this task we are going to configure a duplicity script wrapper. Unregarded of the installation instructions it's expected that you have already signed up for an Amazon account and know how to use their services.

Requirements

  • Ubuntu server
  • duplicity, Git, GnuPG
  • MySQL
@maedhr
maedhr / gist:8823168
Created February 5, 2014 13:04
React GoogleMap Example
<html>
<head>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false" ></script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://fb.me/react-0.8.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.8.0.js"></script>
<script type='text/jsx'>
/** @jsx React.DOM */
ExampleGoogleMap = React.createClass({
getDefaultProps: function () {
@rbres
rbres / gist:7938348
Last active March 4, 2016 04:47
Set Custom Youtube Playback Speed (ex. 3X)
vid = document.getElementsByClassName("video-stream html5-main-video")[0];
vid.playbackRate = 3.0;
@kerryrodden
kerryrodden / .block
Last active April 22, 2024 19:24
Sequences sunburst
license: apache-2.0
/* When the console width is 624px or less */
@media all and (max-width: 624px) and (min-width: 0px) {
/* Hide the audits tab */
#-webkit-web-inspector #toolbar .toolbar-item.audits {
display: none !important;
}
}