Skip to content

Instantly share code, notes, and snippets.

View kikoseijo's full-sized avatar
💭
42Malaga Student

Kiko Seijo kikoseijo

💭
42Malaga Student
View GitHub Profile
@kikoseijo
kikoseijo / mysql_countries.sql
Created August 30, 2016 14:05 — forked from kamermans/mysql_countries.sql
MySQL Dump - continents and countries with 2 and 3 char codes, names and full names - Braintree compatible as of Dec 2011
/**
* Continents and Countries MySQL Tables compiled from Wikipedia, Braintree Payments documentation
* and a couple other places I don't recall at the moment. This data is compatible with the Braintree
* Payment API as of Dec 2011
*
* Compiled by Steve Kamerman, 2011
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
@kikoseijo
kikoseijo / pthreads_example.php
Created August 30, 2016 14:07 — forked from kamermans/pthreads_example.php
An adaptation of an example from the pthreads project that shows how to make 32 simultaneous web requests in PHP using multi-threading via pthreads.
<?php
error_reporting(E_ALL);
class AsyncWebRequest extends Thread {
public $url;
public $num;
public $data;
public function __construct($url, $num){
$this->url = $url;
#!/bin/bash
IFS=$'\n'
while read writable_dir
do
find "$writable_dir" -type f -not -iname '*.php' -print0 | xargs -0 egrep -i "(<\?php|<\?=|<\? *(?!(xml)))" --color
done < writable_dirs.txt
#!/bin/bash
search_dir=$(pwd)
writable_dirs=$(find $search_dir -type d -perm 0777)
for dir in $writable_dirs
do
#echo $dir
find $dir -type f -name '*.php'
done
#!/bin/bash
IFS=$'\n'
while read php_file
do
egrep -i "(mail|eval|base64_decode|str_rot13|chmod|fwrite|exec|passthru|shell_exec|system|proc_open|popen|curl_exec|curl_multi_exec|show_source|fsockopen|pfsockopen|stream_socket_client) *\(" "$php_file"
done < php_in_writable.txt
<?php
use Swagger\Annotations as SWG;
/**
* @SWG\Swagger(
* basePath="/v1",
* host="api.local",
* schemes={"http"},
* produces={"application/json"},
@kikoseijo
kikoseijo / FormRequest.php
Last active May 4, 2017 01:39
Laravel unique rules on FormRequest
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\Vehicle;
class VehicleRequest extends FormRequest
{
@kikoseijo
kikoseijo / .profile
Created October 28, 2017 15:43
Webserver Centos user custom profile for envoy and composer to work
alias php="/usr/bin/php71"
alias composer="php /bin/composer"
@kikoseijo
kikoseijo / readme.md
Created October 28, 2017 18:16
Printing Sheet React
Trigger Content
_i→ import empty
_ir→ import react
_irc→ import react and component
_irp→ import react and prop-types
_ircp→ import react, component and prop-types
_ird→ import react-dom
_ex→ export
@kikoseijo
kikoseijo / .bash_profile
Last active November 28, 2017 11:56
.bash_profile (OSX - Fullstack)
# PATH and evn
export ANDROID_HOME="$HOME/Library/Android/sdk"
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
export PATH="$HOME/.composer/vendor/bin:$PATH"
export PATH="$HOME/kscripts:$PATH"
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# React-Native