Skip to content

Instantly share code, notes, and snippets.

@findchris
findchris / gist:1441156
Created December 7, 2011 02:29
easyXDM error
Uncaught TypeError: Cannot call method 'replace' of undefined
resolveUrl in easyXDM.js:281
prepareTransportStack in easyXDM.js:543
easyXDM.Rpc in easyXDM.js:1202
@findchris
findchris / gist:1441158
Created December 7, 2011 02:29
consumer page easyXDM Rpc
new easyXDM.Rpc(
{
swf: "http://ourstaticcontent/easyxdm.swf",
remote: content_url, // the URL of iframe opened by the consumer
container: container, // the iframe object
onReady: function() {
console.log('activityFrameLoaded: onReady'); // this gets called
}
},
{
@findchris
findchris / geoiplookup.c
Created April 11, 2012 21:03
Patch to add region name to geoiplookup
\diff --git a/apps/geoiplookup.c b/apps/geoiplookup.c
index bd3c6fc..44a6d8e 100644
--- a/apps/geoiplookup.c
+++ b/apps/geoiplookup.c
@@ -296,7 +296,8 @@ geoiplookup(GeoIP * gi, char *hostname, int i)
printf("%s: IP Address not found\n", GeoIPDBDescription[i]);
}
else {
- printf("%s: %s, %s, %s, %s, %f, %f\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region),
+ printf("%s: %s, %s, %s, %s, %s, %f, %f\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region),
@findchris
findchris / gist:2415544
Created April 18, 2012 18:15
redis-server at 100% CPU
root@domU-12-31-39-14-09-3D:~# /tmp/poor.sh
4
2 pthread_cond_wait@@GLIBC_2.3.2,bioProcessBackgroundJobs,start_thread,clone,??
1 accept,anetGenericAccept,anetTcpAccept,acceptTcpHandler,aeProcessEvents,aeMain,main
root@domU-12-31-39-14-09-3D:~# /tmp/poor.sh
4
2 pthread_cond_wait@@GLIBC_2.3.2,bioProcessBackgroundJobs,start_thread,clone,??
1 open64,_IO_file_fopen,??,redisLog,acceptTcpHandler,aeProcessEvents,aeMain,main
root@domU-12-31-39-14-09-3D:~# /tmp/poor.sh
4
@findchris
findchris / gist:2424421
Created April 19, 2012 21:46
redis-cli info
redis-cli info
redis_version:2.4.7
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.3
process_id:18350
uptime_in_seconds:5674707
uptime_in_days:65
~# cat /proc/meminfo
MemTotal: 7864548 kB
MemFree: 3046728 kB
Buffers: 1345184 kB
Cached: 1408600 kB
SwapCached: 0 kB
Active: 3750776 kB
Inactive: 653648 kB
Active(anon): 1650688 kB
Inactive(anon): 156 kB
@findchris
findchris / activity.json
Created September 12, 2012 22:42 — forked from astein/activity.json
Engagement Servering JSON Specs
{
"version":"3.1",
"type":"AS",
"width":750,
"height":500,
"interactive_url":"http://media.socialvi.be/debug/3.1/com/socialvibe/tools/builder/BuilderEngagementModule.swf",
"config_json": {"type":"wizard","foregroundLayer":{"backgroundEnabled":true,"controls":[],"foregroundEnabled":true,"panelName":"foreground"},"wizard":{"templateClass":"com.socialvibe.tools.wizard.templates::ExternalPlayerTaggedTemplate","stepTemplateMap":{"step 1":"com.socialvibe.tools.wizard.templates::ExternalPlayerTaggedStep"}},"self_serve_url":"https://zynga.socialvibe.com/","steps":[{"backgroundEnabled":true,"controls":[{"height":295,"controlClass":"com.socialvibe.core.ui.controls::SVIFrame","url":"http://player.ebuzzing.com/xtst/ifr/playern_ifr.php?parametre=723580&vielnk=getUrlAsIframe(http%3A%2F%2Fpartners.socialvi.be%2Ftags%2Ftrack_interaction%3Finteraction%3Dvideo_completed)","scrollbars":false,"name":"iframe 1","x":156,"y":100,"width":435},{"controlClass":"com.socialvibe.core.ui.controls::SVButton","width":100,"action
{
"steps":[
{
"controls":[
{
"name":"swf 1",
"x":157.5,
"y":102,
"preload_urls":[
"swf_url"
$ ./sbt assembly
Detected sbt version 0.12.3
[info] Loading project definition from /Users/chris/code/swagger-codegen/project
[info] Set current project to swagger-codegen (in build file:/Users/chris/code/swagger-codegen/)
[warn] Credentials file /Users/chris/.ivy2/.credentials does not exist
[info] ApiExtractorTest:
[info] ApiExtractor
[info] - should verify the deserialization of the store api
[info] ModelSerializationTest:
[info] - should deserialize a model
@findchris
findchris / gist:6346961
Created August 26, 2013 21:37
Today's pingdom server IPs
> wget --quiet -O- https://www.pingdom.com/rss/probe_servers.xml | perl -nle 'print $1 if /IP: (([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]));/'
95.141.32.46
95.211.217.68
91.109.115.41
83.170.113.210
188.138.118.144
174.34.224.167
72.46.140.106
76.72.172.208
184.75.210.226