Skip to content

Instantly share code, notes, and snippets.

View tobsn's full-sized avatar

Tobsn tobsn

  • US/EU/SEA
View GitHub Profile
@tobsn
tobsn / engineer.md
Created January 5, 2017 10:18 — forked from v0lkan/engineer.md
The Evolution of a Software Engineer

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 / unsure.txt
Created September 9, 2016 11:16
unsubscribe in different languages
We wish you wouldn't go, but we want to respect your inbox. Please verify your email address below. Thank you!
Nous ne souhaiterions pas vous perdre, mais nous respectons votre choix. Veuillez vérifier l’adresse ci-dessous. Merci.
@tobsn
tobsn / cf.states.custom.html
Last active May 19, 2016 21:53
clickfunnel snippets
<div class="de elInputWrapper elSelectFormBox de-editable de-input-block elAlign_center elMargin0" id="tmp_select_input-97365" data-de-type="select-input" data-de-editing="false" data-title="select input form" data-ce="false" data-trigger="none" data-animate="fade" data-delay="500" type="state" style="margin-top: 10px; outline: none; cursor: pointer;">
<label class="elInputLabel">
<select name="state" class="elInput elSelectInput elInput100 elAlign_left elInputMid elInputStyl0 elInputBG1 elInputBR5 elInputI0 elInputIBlack elInputIRight required0 elInput-Select1 garlic-auto-save" data-type="state">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
function ismobile(){var a=navigator.userAgent||navigator.vendor||window.opera;return (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|
@tobsn
tobsn / info.txt
Last active November 6, 2023 21:41 — forked from rpgreen/master.vm
API Gateway "Send Everything" Mapping Template
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
{
"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 March 18, 2016 14:51 — forked from eddmann/SecureSessionHandler.php
Secure session handler implementation.
<?php
class SecureSessionHandler extends SessionHandler {
protected $key, $name, $cookie;
public function __construct($key, $name = 'MY_SESSION', $cookie = [])
{
$this->key = $key;
$this->name = $name;
@tobsn
tobsn / encodedecode.js
Last active March 18, 2016 11:41
char code shifting encode decode
var z='',x='',s = 'now.something.com';
for( var i = 0; i < s.length; i++ ){
x += String.fromCharCode(s.charCodeAt(i)^6);
}
console.log(x)
for( var i = 0; i < x.length; i++ ){
z += String.fromCharCode(6^x.charCodeAt(i));
}
console.log(z)
@tobsn
tobsn / replace php
Created March 18, 2016 11:38
super simple token replace
$G['c2'] = 'bar';
$r='http://google.com/?s1=#c1#&s2=#c2#';
$r=preg_replace('/#([^#]+?)#/sUe','$G{"$1"}',$r);
http://google.com/?s1=&s2=bar
$var = 'zee,tv,Zee Khana Khazana,Mango,Kulfi,Khana Khazana (TV Program),Sanjeev Kapoor (Chef),Khoa (Dish),Condensed Milk (Invention),Mango Purée (Ingredient),Dessert (Type Of Dish)';
$var = array_filter(array_map(function($v){$v=mb_strtolower(trim($v));return (strlen($v)>2)?$v:0;},explode(',',preg_replace('/\s\([^)]+\)/','',$var))));
Array
(
[0] => zee
[2] => zee khana khazana
[3] => mango
[4] => kulfi
[5] => khana khazana