Skip to content

Instantly share code, notes, and snippets.

@luqmaan
luqmaan / all.md
Last active August 29, 2015 14:10
busta names
  1. Busta rides
  2. Busty
  3. Busty bottoms
  4. Bustulent
  5. Busted
  6. OneBustAway
  7. DowntownOrBust
  8. Bust line
  9. LocoPresto
  10. Wef
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luqmaan
luqmaan / compare_ebay_wsdl.sh
Created February 3, 2015 00:17
Compare eBay 767 WSDL with latest WSDl
#!/usr/bin/env bash
curl https://web.archive.org/web/20120315095344/http://developer.ebay.com/webservices/latest/eBaySvc.wsdl > 767.wsdl
curl http://developer.ebay.com/webservices/latest/ebaySvc.wsdl > latest.wsdl
export LESS="-RCQaix4"
patterns=(Ack AdjustmentAmount ApiAccessRule Buyer BuyerCheckoutMessage BuyerUserID CategoryName CheckoutStatus CityName ConvertedStartPrice Country CountryName CreatedTime DailyHardLimit DailyUsage Email ErrorCode ErrorParameters Errors ExternalAddressID HardExpirationTime HasMoreOrders HourlyHardLimit HourlyUsage Item ItemArray ItemID ItemSpecifics ListingDetails ListingStatus ListingType LongMessage Name NameValueList Order OrderArray OrderID OrderLineItemID PaginationResult PaymentMethod Phone PostalCode PrimaryCategory Quantity QuantityPurchased QuantitySold RegistrationDate SKU SalesTax SalesTaxAmount SellingManagerSalesRecordNumber SellingStatus SessionID SeverityCode ShippedTime ShippingAddress ShippingDetails ShippingPackageDetails ShippingService ShippingServiceCo
@luqmaan
luqmaan / es_setup.py
Created April 14, 2015 11:31
Setup Elasticsearch with the data from https://raw.githubusercontent.com/scascketta/CapMetrics. Checkout the data branch and run this.
#!/usr/bin/env python
import glob
import json
import sys
import arrow
import requests
import elasticsearch
import elasticsearch.helpers
* /
function() {
var e, t, n;
di.provide("di.ui.CanvasBlur"), t = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465
@luqmaan
luqmaan / output.sql
Last active August 29, 2015 14:22
Transform EPSG 2277 into normal latitude and longitude. Used with Austin's Parks and Recreation park data. Uses PostGIS
POLYGON((-97.7687362778002 30.3717650351804,-97.768874049635 30.37169765521,-97.7692586673678 30.3715035247484,-97.7692652959938 30.3712927241672,-97.7692689401395 30.3711767965393,-97.7691567890296 30.3700707061847,-97.7696624503949 30.3697197483224,-97.7696878711314 30.369743111801,-97.7697144892603 30.3697583862574,-97.7697440930412 30.3697686862194,-97.7697754888891 30.3697736584759,-97.769792786984 30.3697733184167,-97.7698073842607 30.3697730317559,-97.7698224757268 30.369770047947,-97.7698384731024 30.3697668864334,-97.7698518705641 30.3697616264478,-97.7699310336165 30.3701926741441,-97.7697306441092 30.3704822675733,-97.769610264213 30.3707748368802,-97.7696057520131 30.3710638901788,-97.7695281780238 30.3713284346645,-97.769442100388 30.3713889260538,-97.7693321719845 30.3718848706923,-97.7693698240369 30.3719898067316,-97.7695186565339 30.3723881433225,-97.7694357653889 30.3725423479022,-97.7693561907433 30.3725038488624,-97.7693241006164 30.3725475421472,-97.7690220719379 30.3726333114381,-97.7690
import json
import psycopg2
conn = psycopg2.connect("dbname='bostongreenmap' user='django' host='localhost' password='django'")
cursor = conn.cursor()
with open('./data/city_of_austin_parks.json', 'r') as fh:
data = fh.read()
@luqmaan
luqmaan / request-when-example.js
Last active August 29, 2015 14:22
Use request/request and when.js together
import when from 'when';
import rw from './request-when';
return rw({
uri: '/howdy',
method: 'get',
})
.tap((body) => console.log('hai', body))
.catch((err) => console.error(err));
var extent = turf.extent(this.props.parkGeo);
var bounds = [
[extent[0], extent[1]],
[extent[2], extent[3]],
];
@luqmaan
luqmaan / luq.zsh-theme
Last active August 29, 2015 14:23
Like simple.zsh-theme, but with the time and return code. Now with git-radar.
source ~/dev/gits/git-radar/radar-base.sh
PROMPT='%{$fg[black]%}%* %? %~ $(git_prompt_info) $(zsh_color_changes_status | xargs)
%{$fg[green]%}%1d %{$fg[black]%}$ %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"