Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zachgoldstein
zachgoldstein / logstashToAirbrake.sh
Last active March 27, 2017 20:06
Load elasticsearch errors into airbrake
#!/bin/bash
echo "Make sure queryData.json is also downloaded"
read -p "Elasticsearch username: " esUser
read -p "Elasticsearch password: " esPass
read -p "Elasticsearch domain: " esAddress
read -p "Airbrake project key: " airbrakeProjectKey
read -p "Airbrake project id: " airbrakeProjectId
airbrakeHostname=https://airbrake.io
@zachgoldstein
zachgoldstein / gist:21367cf10f61d9c6ae96
Created February 3, 2015 00:13
C++ std lib error.
➜ gosnow git:(master) ✗ go build -o static -ldflags "-linkmode external -extldflags -static" ./gosnow.go
# command-line-arguments
Undefined symbols for architecture x86_64:
"std::string::_Rep::_M_destroy(std::allocator<char> const&)", referenced from:
_sc_blueprint_free in libsnowcrash.a(CBlueprint.o)
std::vector<std::pair<std::string, std::string>, std::allocator<std::pair<std::string, std::string> > >::~vector() in libsnowcrash.a(CBlueprint.o)
std::vector<snowcrash::ResourceGroup, std::allocator<snowcrash::ResourceGroup> >::~vector() in libsnowcrash.a(CBlueprint.o)
snowcrash::Resource::~Resource() in libsnowcrash.a(CBlueprint.o)
snowcrash::Payload::~Payload() in libsnowcrash.a(CBlueprint.o)
snowcrash::Parameter::~Parameter() in libsnowcrash.a(CBlueprint.o)
@zachgoldstein
zachgoldstein / gist:8279261
Created January 6, 2014 07:05
ios build error
CompileXIB aston/Controllers/Onboarding/Tab/ACTabThankyouNoUberViewController.xib
cd /Users/zachgoldstein/Desktop/contracting/loke/aston-ios
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 6.0 --output-format human-readable-text --compile /Users/zachgoldstein/Library/Developer/Xcode/DerivedData/aston-hbkzzllklbwtbvaqlqunogsgbdne/Build/Products/Debug-iphonesimulator/aston.app/ACTabThankyouNoUberViewController.nib /Users/zachgoldstein/Desktop/contracting/loke/aston-ios/aston/Controllers/Onboarding/Tab/ACTabThankyouNoUberViewController.xib
2014-01-06 17:44:08.634 ibtoold[58175:707] [MT] DVTAssertions: ASSERTION F
root@raspbx:~# /sbin/modinfo rt2800usb
filename: /lib/modules/3.6.11+/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko
license: GPL
firmware: rt2870.bin
description: Ralink RT2800 USB Wireless LAN driver.
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 26B2F2D12E78CD38ECEA0F7
alias: usb:v0586p341Ad*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v083ApF511d*dc*dsc*dp*ic*isc*ip*in*
root@raspbx:~# sudo hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Add own interface ifindex 4
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
@zachgoldstein
zachgoldstein / gist:5825790
Created June 20, 2013 19:23
iw dev; iw list
root@raspbx:~# iw dev; iw list
phy#0
Interface wlan0
ifindex 3
type managed
Wiphy phy0
Band 1:
Capabilities: 0x172
HT20/HT40
Static SM Power Save
root@raspbx:~# dmesg
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.6.11+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #408 PREEMPT Wed Apr 10 20:33:39 BST 2013
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: BCM2708
[ 0.000000] cma: CMA: reserved 16 MiB at 1e000000
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 126976
@zachgoldstein
zachgoldstein / gist:5825526
Created June 20, 2013 18:53
hostapd -dd logs
root@raspbx:~# sudo hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
nl80211: Register frame match - hexdump(len=2): 04 0a
nl80211: Failed to register Action frame processing - ignore for now
@zachgoldstein
zachgoldstein / gist:5818174
Created June 19, 2013 21:20
hostapd -dd logs
root@raspbx:~# cat /proc/sys/kernel/random/entropy_avail
4096
root@raspbx:~# sudo hostapd -dd /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
nl80211: interface wlan0 in phy phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Using driver-based off-channel TX
nl80211: Register frame command failed (type=208): ret=-114 (Operation already in progress)
@zachgoldstein
zachgoldstein / gist:5808617
Created June 18, 2013 19:43
asterisk debug logs
oot@pbx:~ $ asterisk -r
Asterisk 11.3.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 11.3.0 currently running on pbx (pid = 1689)
pbx*CLI>