SSH into your EC2 instance. Run the following:
$ sudo yum install gcc
This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
#include <stdio.h> | |
// | |
// Nearly minimal CUDA example. | |
// Compile with: | |
// | |
// nvcc -o example example.cu | |
// | |
#define N 1000 |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
# these make the ec2 commands just work | |
export AWS_ACCESS_KEY=[AWS access key] | |
export AWS_SECRET_KEY=[AWS secret] | |
# fetch the instance id | |
export INSTANCE_ID=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id) | |
#grep out the tag you're looking for, in this case "Name" | |
export APP_TAG=$(ec2-describe-tags | grep $INSTANCE_ID | grep -oE "Name\\W+(.+)$" | grep -oE "\\W.+$") |
'use strict'; | |
var express = require('express'); | |
var newrelic = require('newrelic'); | |
function allowCrossDomain(req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
next(); | |
} |
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc
This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
var concurrency = 100; | |
var http = require('http'); | |
http.globalAgent.maxSockets = concurrency; | |
var AWS = require('aws-sdk'); | |
var s3 = new AWS.S3(); | |
for (var i = 0; i < concurrency; i++) { | |
s3.listBuckets(callback); |
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
chmod 600 id_rsa.pem |
#include <unistd.h> | |
#include <mach/mach.h> | |
#include <mach/mach_vm.h> | |
#include <mach-o/dyld.h> | |
int | |
main (int argc, char * argv[]) | |
{ | |
volatile char * library; | |
const mach_vm_size_t page_size = getpagesize (); |