Skip to content

Instantly share code, notes, and snippets.

View KIMBIBLE's full-sized avatar
🎯
Focusing

bbkim KIMBIBLE

🎯
Focusing
View GitHub Profile

MongoDB Cheat Sheet

Connect to a database after starting mongo client

$ mongo
use dbname

Call this command before using a specific database. This command also creates the database, but the new database is only save when you insert the first document in a collection.

@KIMBIBLE
KIMBIBLE / sql-mongo_comparison.md
Created May 13, 2018 19:24 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@KIMBIBLE
KIMBIBLE / iterm2.md
Created May 13, 2018 11:58 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
@KIMBIBLE
KIMBIBLE / listTest.cpp
Created March 12, 2018 04:57
list begin end???
#include <iostream>
#include <list>
#include <algorithm>
using namespace std;
int main()
{
list <int> l;
cout << "l.size() : " << l.size() << endl; // size = 0
@KIMBIBLE
KIMBIBLE / getline1.cpp
Created December 3, 2017 05:26
How to continue string input loop while meets EOF in cpp
#include <iostream>
#include <string>
using namespace std;
int main()
{
string strBuf;
while(getline(cin, strBuf))
{
cout << strbuf < '\n';
@KIMBIBLE
KIMBIBLE / VectorExample2.cpp
Created November 25, 2017 16:09
STL> Vector Example2
#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
using namespace std;
#define MAX_USER 6
class UserInfo
{
@KIMBIBLE
KIMBIBLE / VectorExample1.cpp
Created November 25, 2017 13:56
STL> Vector Example1
#include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
template <typename T>
class Stack
{
public:
@KIMBIBLE
KIMBIBLE / ListExample.cpp
Created November 25, 2017 12:55
STL> List Example
#include <iostream>
#include <list>
#include <stdio.h>
using namespace std;
class Point
{
public:
Point(int x, int y) :xPos(x), yPos(y){}
@KIMBIBLE
KIMBIBLE / ex_r0pbaby.py
Created August 20, 2017 18:12
[exploit code] : DEF CON 2015 Quals – r0pbaby
from pwn import *
leak = lambda s, x, y : int(s.recv().split('\n')[x].split(' ')[y], 16)
#context.log_level = 'debug'
NAME = './r0pbaby'
elf = ELF(NAME)
#rop = ROP(elf)
@KIMBIBLE
KIMBIBLE / rce_rop.py
Created August 12, 2017 10:49
RCE_ROP
'''
from socket import *
import struct
HOST = '0.0.0.0'
PORT = 7777
s = socket(AF_INET, SOCK_STREAM, 0)
s.connect((HOST, PORT))