Skip to content

Instantly share code, notes, and snippets.

View dieisonbeck's full-sized avatar

Dieison Beck dieisonbeck

View GitHub Profile
@teknosains
teknosains / MY_Security.php
Last active November 19, 2020 20:30 — forked from CMCDragonkai/MY_Security.php
PHP: Codeigniter CSRF functionality does not support putting the CSRF token in the HTTP headers for the purposes of the double submit cookie method. It also only runs the CSRF check on POST and not on PUT or DELETE. This drop in MY_Security.php makes sure CSRF runs on POST, PUT or DELETE and checks the HTTP headers for X-XSRF-TOKEN recommended b…
<?php
class MY_Security extends CI_Security{
//overriding the normal csrf_verify, this gets automatically called in the Input library's constructor
//verifying on POST and PUT and DELETE
public function csrf_verify(){
//attach to global POST variable
//this will catch any method POST, PUT, DELETE
@Atlas7
Atlas7 / remove_postgres_on_mac_os.md
Last active March 23, 2023 13:02
Note - How completely uninstall PostgreSQL 9.X on Mac OSX

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.
@erichrobinson
erichrobinson / README.md
Last active February 24, 2024 08:32
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@wouerner
wouerner / ArrayObject.php
Last active October 1, 2020 16:51
ArrayObject PHP exemplos
<?php namespace livraria;
/**
* Como usar ArrayObject
* OBS: Instale o php xdebug para visualizar os resultados.
**/
/**
* Objeto livro
* @author Wouerner <wouerner@gmail.com>
@handerson
handerson / mysqlfix.sh
Created March 27, 2012 16:52 — forked from davejlong/mysql client
How to setup the MySQL client and MySQLDump client on Mac OS x from MySQL Workbench
#MySQL Client
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysql /usr/bin/mysql
#MySQL Dump
ln -s /Applications/MySQLWorkbench.app/Contents/Resources/mysqldump /usr/bin/mysqldump
#How to fix the "Library not loaded: libmysqlclient.18.dylib (LoadError)" error
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib