Instantly share code, notes, and snippets.

View omnivore_fixed_ds_stats.rb
# NOTE: run once on production, ideally after pr is merged to master, and first revenue stat is pullled.
# that way we can get all stats before revenue stat time, and update `old_stats_time` with appropriate time.
# Try on sandbox: `bundle exec rails c --sandbox`
# ======
omnivore_ds_ids = DataStream.where(source: "omnivore").pluck(:id)
transaction_stats_before = StoreStat.where(stat_type: "transactions", data_stream_id: omnivore_ds_ids).where("time < ?", Time.current.in_time_zone(; 0
revenue_stats_before = StoreStat.where(stat_type: "sales", data_stream_id: omnivore_ds_ids).where("time < ?", Time.current.in_time_zone(; 0
old_stats_time = Time.current.in_time_zone(
Brand Model Android Version Build Remote Input File Transfer (Desk2App) File Transfer (App2Desk) Reconnect (Desktop disruption) Reconnect (Phone disruption)
OnePlus 5T 8.1.0 lastStableBuild comments comments comments comments comments
OnePlus 5T 8.1.0 lastSuccessfulBuild comments comments comments comments comments
View webpack.config.js
var path = require('path')
var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
View output_log.txt
Log uploaded on Wednesday, October 17, 2018, 10:08:56 PM
Loaded mods:
Core: (no assemblies)
HugsLib[6.0.1]: 0Harmony(, HugsLib(
Defensive Positions: $HugsLibChecker(, DefensivePositions(
Allow Tool: $HugsLibChecker(
Colony Manager: 0Harmony(, Fluffy_ColonyManager(4.1.415.0)
Hospitality[0.19.2]: $HugsLibChecker(, Hospitality(
Expanded Prosthetics and Organ Engineering: (no assemblies)
EdB Prepare Carefully: 0Harmony(, EdBPrepareCarefully(
View PostfixEvaluation.cpp
Evaluation Of postfix Expression in C++
Input Postfix expression must be in a desired format.
Operands must be integers and there should be space in between two operands.
Only '+' , '-' , '*' and '/' operators are expected.
View massachusetts.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View unifi.service
Description=UniFi Container
ExecStart=/usr/bin/podman start -a unifi-sdn-controller
ExecStop=/usr/bin/podman stop unifi-sdn-controller
View collection.rss.liquid
{% layout none %}{% comment %}
* Shopify Product RSS feed, also needs Cloudflare Workers
* for Content-Type fix to application/rss+xml, because
* Shopify only supports text/html
* Copyright (c) 2018 @fmt
* Licensed under the MIT license:
View ifelse.rb
x = 1
if x > 2
puts "x é maior que 2"
elsif x <= 2 and x!=1
puts "x é menor que 2 e diferente de 1"
puts "não sei o valor de x"
x = 1
View pipenv_completion.ps1
function TabExpansion($line, $lastWord) {
$lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
$aliases = @("pipenv") + @(Get-Alias | where { $_.Definition -eq "pipenv" } | select -Exp Name)
$aliasPattern = "($($aliases -join '|'))"
if($lastBlock -match "^$aliasPattern ") {
$Env:_PIPENV_COMPLETE = "complete-powershell"
$Env:COMMANDLINE = "$lastBlock"
(pipenv) | ? {$_.trim() -ne "" }