Skip to content

Instantly share code, notes, and snippets.

@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
  1. create user and password
mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
  1. Grant privilege to all dbs
mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
@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

Note: This was originally contributed by @mdunisch, @webintoit, and @cwramsey.

It may be moved back on to the Sails website at a future date; I'm just removing it until there's time to break down the "Hosting" section into individual pages. (If anyone's interested in helping w/ that, please send a PR to sails-docs!)

-mike

Deploying a Sails/Node.js application to OpenShift

To deploy to OpenShift, you'll need to make some minor modifications to your configuration:

@jayluxferro
jayluxferro / Glog.md
Created May 8, 2018 16:54
React-Native IoS Fix

Running into the same issue here after upgrading from 0.44. None of the above solutions or clearing caches did the trick for me. Here's what I did to get things working again:

In the Terminal, navigate to the react-native/third-party/glog folder inside node_modules (for me, this was cd node_modules/react-native/third-party/glog-0.3.4) Once actively in this folder, run ../../scripts/ios-configure-glog.sh Glog is configured and the required config.h header file is created for Xcode to find

@jayluxferro
jayluxferro / iDisplay_Setup.md
Last active May 17, 2018 15:19
iDisplay Setup/configuration

iDisplay development setup/configuration

Installation of packages

  1. Open the terminal
  2. Run the following command
sudo apt update
  1. Run the following commands to install the required packages
sudo apt install mysql-server apache2 libapache2-mod-php7.2 mysql-server apache2 libapache2-mod-php7.2 php7.2 python-mysqldb php7.2 php7.2-bcmath php7.2-bz2 php7.2-cgi php7.2-cli php7.2-common php7.2-curl php7.2-dba php7.2-enchant php7.2-fpm php7.2-gd php7.2-gmp php7.2-interbase php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-odbc php7.2-opcache php7.2-pgsql php7.2-pspell php7.2-readline php7.2-recode php7.2-snmp php7.2-soap php7.2-sqlite3 php7.2-sybase php7.2-tidy php7.2-xml php7.2-xmlrpc php7.2-xsl php7.2-zip python-beautifulsoup python-lxml -y
@jayluxferro
jayluxferro / Django2.0_Middleware
Created April 11, 2018 16:47
Django 2.0_Middleware
Django 2.0
You can try this in your settings.py, MIDDLEWARE_CLASSES = [....]:
Change MIDDLEWARE_CLASSES=[...] to MIDDLEWARE=[...]
Remove SessionAuthenticationMiddleware from the MIDDLEWARE=[...] list.
The MIDDLEWARE_CLASSES setting is deprecated in Django 1.10, and removed in Django 2.0.
@jayluxferro
jayluxferro / facebook-contact-info-summary.rb
Created March 24, 2018 13:41 — forked from dylanmckay/facebook-contact-info-summary.rb
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@jayluxferro
jayluxferro / getLastRSSFeed.html
Created March 13, 2018 12:21 — forked from juanbrujo/getLastRSSFeed.html
Get and display last feed from RSS using JavaScript (jQuery)
<html>
<head></head>
<body>
<div class="noticia">CARGANDO</div>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script>
$(function(){
var url = 'https://noticias.cumplo.cl/index.xml';
var news = $('.noticia');
@jayluxferro
jayluxferro / WordpressPluginBugFix.md
Last active March 9, 2018 14:13
Wordpress Plugin Bug Fix

Bug

https://your-wordpress-site.com/wp-admin/load-scripts.php?c=1&load=editor,common,user-profile,media-widgets,media-gallery

Instructions

  1. Open wp-login.php add define('CONCATENATE_SCRIPTS', false); after the <?php
  2. Open wp-admin/load-scripts. Replace require( ABSPATH . WPINC . '/script-loader.php' ); with require( ABSPATH . 'wp-admin/admin.php' );
  3. Open wp-admin/load-styles.php. Replace require( ABSPATH . WPINC . '/script-loader.php' ); with require( ABSPATH . 'wp-admin/admin.php' );
  4. Open wp-admin/includes/noop.php, Replace the entire content with
php