Skip to content

Instantly share code, notes, and snippets.

Victor Reyes Heitmann victorreyesh

View GitHub Profile
@victorreyesh
victorreyesh / 0_reuse_code.js
Created Feb 25, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@victorreyesh
victorreyesh / Keylogger
Created Sep 18, 2013
Keylogger in C++ (Alpha Stage)
View Keylogger
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
int main(int argc, char ** agrv){
using namepace std; /*Easier*/
char std::vector input_STRUCT = ["S", "T", "O"];
char std::vector input_STRUCT_1 = ["P", " "];
View How to do sell Userpoints in Drupal Commerce
1) Rule
Event: on payment completed
Action: loop through the order line-items. Each line-item has an action to call the next component with parameters of order and the line-item.
2) Component
Parameters: order, line-item
Condition: data comparison line-item:type is Product (to expose line-item:commerce-product)
Action: call next component with parameters of order and line-item:commerce-product
3) Component
Parameters: order, product
Condition: data comparison product:type is Product (to expose the product:field-points-to-add)
@victorreyesh
victorreyesh / Aircrack Commands
Created Sep 12, 2013
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
View Aircrack Commands
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
@victorreyesh
victorreyesh / Mongodb up and running
Created Sep 12, 2013
When you have mongo db installed, this is the quick way/ cheat sheet to get it up and running
View Mongodb up and running
// Run these commands in Terminall
Stop mongodb service
sudo service mongodb stop
//Remove mongodb lock file
sudo rm /var/lib/mongodb/mongod.lock
//Change ownership from root to mongodb path
View Website Monitoring Script
WEBSITE=mywebsite.com
SUBJECT_DOWN="$WEBSITE DOWN!"
SUBJECT_UP="$WEBSITE ONLINE"
EMAILID="an@example.com"
STRING=$(curl -A "myshell.co.uk - Website Monitoring Script" -s myshell.co.uk | grep -o "myshell.co.uk")
VALUE="myshell.co.uk"
LOCKFILE="/tmp/webcheck.lock"
if [ "$STRING" != "$VALUE" ] && [ ! -f "$LOCKFILE" ]; then
START_TIME=$(date +%s)
@victorreyesh
victorreyesh / fastcgi_params
Last active Dec 22, 2015
Running CPU: Intel(R) Xeon(R) CPU E5620 @ 2.40GH (16 cores) - PHP FPM, NGINX
View fastcgi_params
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 0;
fastcgi_intercept_errors on;
fastcgi_pass unix:/tmp/fpm.sock;
You can’t perform that action at this time.