Skip to content

Instantly share code, notes, and snippets.

@jayluxferro
jayluxferro / mbp2011-disable-amd-gpu.md
Last active August 31, 2018 17:31 — forked from blackgate/mbp2011-disable-amd-gpu.md
Macbook Pro 2011 - Disable AMD GPU

1. Change the gpu-power-prefs and disable SIP

Boot into recovery single user mode (press and hold Command + S + R) and run the following commands:

nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
csrutil disable
reboot
@jayluxferro
jayluxferro / using-raw-socket-io-in-sails.js
Created August 25, 2018 12:21 — forked from mikermcneil/using-raw-socket-io-in-sails.js
Using raw socket.io functionality in a Sails.js controller
module.exports = {
/**
*
* Using raw socket.io functionality from a Sails.js controller
*
*/
index: function (req,res) {
@jayluxferro
jayluxferro / GitNPMConfigHttpProxy.md
Last active August 9, 2018 09:15 — forked from evantoli/GitConfigHttpProxy.md
Configure Git/NPM to use a proxy

Configure Git to use a proxy

##In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@jayluxferro
jayluxferro / Aircrack Commands
Last active August 22, 2022 23:14 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//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/local/bin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
php pdo set up on mac osx
copy /etc/php.ini.default and rename it /etc/php.ini
Edit your /etc/php.ini :
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
#pdo_mysql.default_socket=/var/mysql/mysql.sock
@jayluxferro
jayluxferro / parallels_tools_ubuntu_new_kernel_fix.md
Created July 11, 2018 15:17 — forked from rudolfratusinski/parallels_tools_ubuntu_new_kernel_fix.md
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15

Preparation

  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*

@jayluxferro
jayluxferro / .htaccess
Last active May 30, 2018 19:06 — forked from keithmorris/.htaccess
CodeIgniter .htaccess file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
@jayluxferro
jayluxferro / js_shellcode.py
Created May 28, 2018 18:59 — forked from Cryptogenic/js_shellcode.py
A script to convert payloads into JS shellcode
#!/usr/bin/python
import sys
import struct
import argparse
def swap32(i):
return struct.unpack("<I", struct.pack(">I", i))[0]
filename = None
@jayluxferro
jayluxferro / install-php7.2-mcrypt.sh
Created May 18, 2018 11:24 — forked from arzzen/install-php7.2-mcrypt.sh
Install PHP 7.2 MCrypt extension
## How to install mcrypt in php7.2
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
##
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php