Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobsn tobsn

  • San Francisco/Diego, USA; Munich, Germany;
View GitHub Profile
@tobsn
tobsn / LocalSettings.php
Created Mar 27, 2018 — forked from amrav/LocalSettings.php
Slack integration using Redis
View LocalSettings.php
# Slack integration
require_once "$IP/extensions/Slack/Slack.php";
# Slack extension configuration options
$wgSlackWebhookURL = "https://hooks.slack.com/services/some-webhook-url"
$wgSlackUserName = "batman";
$wgSlackChannel = "#recent-changes";
$wgSlackIconURL = "http://i.picresize.com/images/2015/09/20/tdpsU.jpg";
$wgSlackLinkUsers = true;
@tobsn
tobsn / engineer.md
Created Jan 5, 2017 — forked from v0lkan/engineer.md
The Evolution of a Software Engineer
View engineer.md

This gist outlines the change in the depth and breadth of the tasks and responsibilities of a software engineer as she continuously improves herself.

I created this to supplement a discussion in an internal slack group; then I though the rest of the world might benefit from this too.

Contributions are always welcome.

Associate Engineer

  • Knowledge
@tobsn
tobsn / info.txt
Last active Nov 24, 2017 — forked from rpgreen/master.vm
API Gateway "Send Everything" Mapping Template
View info.txt
https://rpgreen.wordpress.com/2016/02/23/a-mapping-template-to-send-everything-to-your-backend-integration/
location/cookie headers:
https://stackoverflow.com/questions/35595672/aws-api-gateway-use-302-redirect-and-set-cookie-header
https://blog.hiramsoftware.com/blog/day-one-aws-api-gateway/
@tobsn
tobsn / aws-sns-event-template-with-actual-ses-deliverynotification-sns-message Lambda function to process a Amazon SES Delivery Notification message from a SNS Topic into a DynamoDB Table
View aws-sns-event-template-with-actual-ses-deliverynotification-sns-message
{
"Records": [
{
"EventSource":"aws:sns",
"EventVersion":"1.0",
"EventSubscriptionArn":"arn:aws:sns:us-west-2:xxxx:xxxx",
"Sns": {
"Type":"Notification",
"MessageId":"88B1B251-2E92-4FC3-BFAA-E3BBD0BAB10A",
"TopicArn":"arn:aws:sns:us-west-2:881222951025:survey-tool-ses-delivery",
@tobsn
tobsn / SecureSessionHandler.php
Last active Mar 18, 2016 — forked from eddmann/SecureSessionHandler.php
Secure session handler implementation.
View SecureSessionHandler.php
<?php
class SecureSessionHandler extends SessionHandler {
protected $key, $name, $cookie;
public function __construct($key, $name = 'MY_SESSION', $cookie = [])
{
$this->key = $key;
$this->name = $name;
View gist:9df39ecca19f30c55689

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
View states_hash.json
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
View simple_request.js
var http = require('http')
, parse = require('url').parse
, StringDecoder = require('string_decoder').StringDecoder;
var LIMIT = 10 * 1024;
var request = function(url, body, func) {
if (typeof url !== 'object') {
url = parse(url);
}
View simple_request.js
var parse = require('url').parse,
http = require('http'),
StringDecoder = require('string_decoder').StringDecoder;
var request = function(url, body, func) {
if (typeof url !== 'object') {
url = parse(url);
}
if (!func) {