Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View shofetim's full-sized avatar

Jordan Schatz shofetim

View GitHub Profile
@shofetim
shofetim / report.sql
Created February 17, 2020 21:11
Guild Report
with work_history as (
select
distinct on (profile_id)
profile_id,
created_at
from profiles_workhistory
where finalized = true
order by profile_id, created_at asc, id
), verification as (
select
@shofetim
shofetim / query.sql
Created January 31, 2020 14:01
CBP Clients
select
id,
casenumber,
client__r.firstname,
client__r.lastname
from case
where
status != 'Closed'
and client__c != null
and client__r.recordtypeid in ('01241000000yZEzAAM', '01241000001YbAWAA0')
var Comment = {
oninit: function (vnode) {
this.comment = vnode.attrs;
},
view: function () {
var item, extra, that;
that = this;
item = this.comment;
if (item.children.length == 0) {
return m("li", {key: item.id}, [
"use strict";
var log = function(msg) {
console.log(msg);
};
var SelectWidget = {},
App = {},
path = [],
data = {
phone: {

My mappings:

{
  "abstract": {
    "type": "text",
    "term_vector": "with_positions_offsets"
  },
  "app_country": {
    "type": "text",
function parseLabel(label, r) {
const res = r || [];
res.push(label.label_name.replace(/[,\s]+$/g, '').trim())
if (label.label_child) {
parseLabel(label.label_child, res)
}
return res.join(', ');
}
classifications = parseLabel(result._source.classifications[0])
<?php
#exit;
#$ua=$_SERVER['HTTP_USER_AGENT'];
#if ($ua == 'GuzzleHttp/6.2.0 curl/7.35.0 PHP/5.5.9-1ubuntu4.17') {
#header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
#header("Status: 404 Not Found");
#$_SERVER['REDIRECT_STATUS'] = 404;
#exit;
var https = require('https'),
http = require('http'),
url = require('url'),
restify = require('restify'),
FeedParser = require('feedparser'),
log = console.log.bind(console);
var get = (str, callback) => {
var handler = res => callback(res),
endpoint = url.parse(str),
export PGPASSWORD=redacted
export AWS_ACCESS_KEY_ID=redacted
export AWS_DEFAULT_REGION=us-west-2
export AWS_SECRET_ACCESS_KEY=redacted
pg_dump -h shops-ksl-com.cxpx7kkpqtcv.us-west-2.rds.amazonaws.com -U redacted redacted | gzip | mpipe ~~/stor/bobosales/`date +%Y-%m-%d`-backup.sql.gz
easy_install-2.7 awscli
aws s3 sync s3://images.bobosales.com/ images/
tar -cf images.tar images
gzip images.tar
mput -f images.tar.gz ~~/stor/bobosales/images.tar.gz
var bf5 = {};
bf5.util = {
getQueryParameter: function (name) {
var url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return "";