Skip to content

Instantly share code, notes, and snippets.

View wolfeidau's full-sized avatar
🐺
Building data science projects

Mark Wolfe wolfeidau

🐺
Building data science projects
View GitHub Profile
{-# LANGUAGE OverloadedStrings #-}
import qualified Network.HTTP.Conduit as H
import Control.Exception
import Web.Scotty
import System.Environment
import System.IO
import System.Directory
import Control.Monad
import Control.Monad.IO.Class
import qualified Data.ByteString.Lazy.Char8 as BS
dtrace -n 'syscall::writev:entry /execname == "node" && arg2 > 16/ { printf("iovcnt: %d", arg2); }' -n 'syscall::writev:return /execname == "node" && arg1 == -1 && errno == 22/ { printf("%s %s %d\\n", curpsinfo->pr_psargs, probefunc, errno); jstack(100, 8000); }'
1 10260 writev:entry iovcnt: 57
1 10261 writev:return node --nouse-idle-notification /voxer/server/node_router/node_router.js /voxer/ writev 22\n
libc.so.1`__writev+0x15
node`uv__write.part.5+0x18f
node`uv_write2+0x1b9
node`uv_write+0x35
node`_ZN4node10StreamWrap6WritevERKN2v89ArgumentsE+0x678
node`_ZN2v88internalL21Builtin_HandleApiCallENS0_12_GLOBAL__N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE+0x157
<< internal code >>
@radiosilence
radiosilence / comments.json
Created January 14, 2014 17:04
Shitty first attempt at something with React.
[{"author":"Barry Smith","text":"Test"},{"author":"James Brown","text":"ASDFG!"}]
@garthk
garthk / hapi-restify.js
Last active January 3, 2016 23:09
hapi plugin to add routes directly from the composer manifest
'use strict';
exports.register = function (plugin, options, next) {
function addRoutes(server) {
var serverPluginSettings = server.settings.plugins || {},
serverSpecificSettings = serverPluginSettings.routify || {},
routes = serverSpecificSettings.routes || options.routes;
if (routes) {
server.route(routes);

build

Clone and build Node for analysis:

$ git clone https://github.com/joyent/node.git
$ cd node
$ export GYP_DEFINES="v8_enable_disassembler=1"
$ ./configure
$ make -j4
@Daniel15
Daniel15 / BaseStore.js
Created May 10, 2015 07:40
Simple Flux
import EventEmitter from 'events';
import Dispatcher from '../dispatcher';
const CHANGE_EVENT = 'change';
export default class BaseStore extends EventEmitter {
constructor() {
super();
this.dispatchToken = Dispatcher.register(this.handleDispatch.bind(this));
@dmorgantini
dmorgantini / AddNumbersService.java
Created August 13, 2012 14:37
Use SOAP with dropwizard
package com.example.helloworld.resources;
import javax.jws.WebMethod;
@javax.jws.WebService(
name = "AddNumbersPortType",
serviceName = "AddNumbersService",
targetNamespace = "http://duke.example.org")
@javax.jws.soap.SOAPBinding(
style = javax.jws.soap.SOAPBinding.Style.DOCUMENT,

How to combine AWS Elastic Beanstalk, Docker and AWS CloudFormation

Introduction

This text explains how to create and deploy a Docker-based AWS Elastic Beanstalk site and how to control it using CloudFormation.

Please find the CloudFormation template at the end of this Gist.

We assume that you are familiar with AWS ElasticBeanstalk, AWS CloudFormation and Docker.

@andif888
andif888 / playbook.yml
Created April 13, 2019 04:17
Ansible Playbook for Ubuntu Desktop minimal
---
- hosts: localhost
tasks:
- name: Add Apt-Keys
apt_key:
url: '{{item.name}}'
state: present
with_items:
@wapa5pow
wapa5pow / gist:51eb79cf3b258a71e0934bfcb1fee463
Created August 15, 2016 05:25
Try to update ca for Amazon Linux
[root@ip-10-0-11-111 anchors]# curl -o /etc/pki/ca-trust/source/anchors/GTEGlRoot.crt https://www.cybertrust.ne.jp/sureserver/download/root_ca/GTEGlRoot.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 890 100 890 0 0 6885 0 --:--:-- --:--:-- --:--:-- 6899
[root@ip-10-0-11-111 anchors]# ls
GTEGlRoot.crt
[root@ip-10-0-11-111 anchors]# update-ca-trust
p11-kit: duplicate 'GTE CyberTrust Global Root' certificate found in: ca-bundle.legacy.crt
p11-kit: duplicate 'GTE CyberTrust Global Root' certificate found in: ca-bundle.legacy.crt
p11-kit: duplicate 'GTE CyberTrust Global Root' certificate found in: ca-bundle.legacy.crt