Skip to content

Instantly share code, notes, and snippets.

How to install MongoDB 2.0 on Mac OS X (>= Leopard)

Procedure

The whole install procedure is like the following.
You would have to do 7 steps.

  1. Download the latest tar file, and expand it.
  2. Move it to /usr/local/, and make a symbolic link to the folder.
  3. Add path to MongoDB binaries.
  4. Make an user that "mongod" runs on, and group that owns the user.
@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@archon810
archon810 / BuildConfig.java
Last active September 28, 2022 15:17
Fake Virus Shield AV
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";
@dhh
dhh / Basecamp-DDOS.md
Last active August 30, 2023 09:33
Basecamp is under network attack (DDoS)

Basecamp was under network attack

The attack detailed below has stopped (for the time being) and almost all network access for almost all customers have been restored. We're keeping this post and the timeline intact for posterity. Unless the attack resumes, we'll post a complete postmortem within 48 hours (so before Wednesday, March 26 at 11:00am central time).

Criminals have laid siege to our networks using what's called a distributed denial-of-service attack (DDoS) starting at 8:46 central time, March 24 2014. The goal is to make Basecamp, and the rest of our services, unavailable by flooding the network with bogus requests, so nothing legitimate can come through. This attack was launched together with a blackmail attempt that sought to have us pay to avoid this assault.

Note that this attack targets the network link between our servers and the internet. All the data is safe and sound, but nobody is able to get to it as long as the attack is being successfully executed. This is like a bunch of people

@ntassone
ntassone / loop.scss
Last active February 18, 2021 18:23
SASS - Loop through array to create class sets.
//Set Variables
$button-white: #ffffff;
$button-green: #44ca00;
$button-green-dark: #369a12;
$button-blue: #a6d1f9;
$button-blue-dark: #14283e;
$button-gray: #eeeeee;
$button-red: #9e0b0f;
//Create Array
@aroman
aroman / gist:8779504
Created February 3, 2014 06:09
lol ruby
require "net/http"
require "uri"
require "json"
require 'terminal-notifier'
URL_ROOT = "http://closings.victorlourng.com/"
def fetch_json
uri = URI.parse(URL_ROOT + "api/?all")

Chrome Flags Breaking CSS In Strange Ways

If you have the Enable experimental Web Platform features flag set as enabled in Chrome you might have been noticed that interweb has been acting pretty weird. Here are some of the issues I encountered:

@zfogg
zfogg / bookmark_me.js
Created December 6, 2013 11:30
B+W Mandela
// Made for http://webapps.aljazeera.net/aje/custom/mandelamosaicwebsite/mandela.html
// too lazy to mouse over entire face
// tl;dr - make bookmark, set URL to:
javascript:$("rect").each(function(d){d3.select(this).attr("fill",function(d){return d.Old})});
// Source:
$("rect").each(function(tile) {
{
"require": {
"adoy/oauth2": "dev-master"
}
}
@jamztang
jamztang / 1a-LiveCameraView.m
Last active October 31, 2021 00:49
My first hackathon experience - 12 hours of hacking and building the essentials. https://medium.com/p/3db44088db70
- (void)viewDidLoad {
[super viewDidLoad];
self.videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionFront];
self.videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
// self.avatarView is a non full screen GPUImageView instance
// created in Storyboard
[self.videoCamera addTarget:self.avatarView];
[self.videoCamera startCameraCapture];