This file contains hidden or 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
| #!/usr/bin/env python3 | |
| """ | |
| Geodesix Nightly Sync | |
| ===================== | |
| Pushes BDG affiliate/shopping articles (all sites) to Geodesix data pipeline. | |
| Rules: | |
| - Tags: "affiliate" OR "shopping" | |
| - Exclude: sponsored=true | |
| - Exclude: any tag slug/name containing "sponsored" |
This file contains hidden or 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 AWS from 'aws-sdk' | |
| import Promise from 'bluebird' | |
| const env = global.env.env | |
| const ddb = new AWS.DynamoDB({ region: 'us-east-1' }) | |
| const TableName = global.env.dynamodb.TableName | |
| const revisionPrefix = global.env.revisionPrefix | |
| const revisionEnv = env === 'development' ? 'beta' : env | |
| export default ({ revision = null } = {}) => { |
This file contains hidden or 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
| var path = require('path'); | |
| var FastBootServer = require('./lib/models/server'); | |
| var outputPath = 'fastboot-dist'; | |
| var appName = 'dummy'; | |
| var server = new FastBootServer({ | |
| appFile: findAppFile(outputPath, appName), | |
| vendorFile: findVendorFile(outputPath), | |
| htmlFile: findHTMLFile(outputPath) | |
| }); |
This file contains hidden or 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
| var elasticsearch = require('elasticsearch'); | |
| var client = new elasticsearch.Client(); | |
| var eventPattern = /([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) \"(.*?)\" \"(.*?)\" \"(.*?)\" \"(.*?)\" \"(.*?)\"/; | |
| exports.handler = function(data, context) { | |
| var events = []; | |
| var encodedEvent, rawEvent, | |
| matchedEvent, event, i, | |
| commands; |
This file contains hidden or 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
| class BustleModel < Ohm::Model | |
| include ActiveModel::Validations | |
| def save | |
| return false unless valid? | |
| super | |
| end | |
| end | |
| class Channel < BustleModel |
This file contains hidden or 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
| redis-cli KEYS *rails-cache* | xargs redis-cli DEL |
This file contains hidden or 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
| require 'pry' | |
| require 'pry-byebug' | |
| require 'date' | |
| require 'json' | |
| def raw_samples | |
| format = 's7c2s16' | |
| samples = [] | |
| open('./sample2.dat', 'rb') do |file| |
This file contains hidden or 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
| isPortrait = ( | |
| imgAspect > windowAspect | |
| || ( | |
| img.naturalWidth > window.innerWidth | |
| && | |
| img.naturalHeight < window.innerHeight | |
| ) | |
| ); |
This file contains hidden or 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
| [alias] | |
| st = status | |
| ci = commit | |
| br = branch | |
| co = checkout | |
| df = diff | |
| lg = log -p | |
| [user] | |
| name = Tyler Love | |
| email = |
This file contains hidden or 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
| class Base | |
| attr_reader :name, :config | |
| attr_accessor :operations | |
| def initialize(name, opts={}) | |
| @name = name | |
| @config = opts | |
| self.operations = { |
NewerOlder