Skip to content

Instantly share code, notes, and snippets.

View bosunski's full-sized avatar
:octocat:
Sleeping Here!

Bosun Egberinde bosunski

:octocat:
Sleeping Here!
View GitHub Profile
@bosunski
bosunski / mysql.database.yml
Created November 14, 2020 13:50 — forked from mmizutani/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
server {
listen 80;
listen 443 ssl http2;
server_name .phpsandbox.test;
root "/home/vagrant/code/public";
index index.html index.htm index.php;
charset utf-8;
<?php
use React\ChildProcess\Process;
use React\EventLoop\Factory;
use function React\Promise\Stream\buffer;
require "vendor/autoload.php";
$proc = new Process("composer");
<?php
// doctor_registration.php
Session::init();
$this->view->data['username'] = Session::get('username') ? Session::get('username') : '';
$this->view->data['first_name'] = Session::get('first_name') ? Session::get('first_name') : '';
$this->view->data['last_name'] = Session::get('last_name') ? Session::get('last_name') : '';
$this->view->data['email'] = Session::get('email') ? Session::get('email') : '';
@bosunski
bosunski / gist:98bd8bef0e1ded439db04973f0f45588
Created July 1, 2020 16:01 — forked from betweenbrain/gist:5405671
Use cURL and SimpleXML to retrieve and parse Wordpress RSS feed
<?php
$curl = curl_init();
curl_setopt_array($curl, Array(
CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/',
CURLOPT_USERAGENT => 'spider',
CURLOPT_TIMEOUT => 120,
CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_RETURNTRANSFER => TRUE,
@bosunski
bosunski / gist:c934c663c7b6f0cbe2298bff54181e01
Created April 8, 2020 17:42 — forked from kapkaev/gist:4619127
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. Resque
$ redis-cli
> config set stop-writes-on-bgsave-error no
@bosunski
bosunski / README.md
Created January 31, 2020 12:55 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
{
"price": 21975,
"customization": {
"id": 5,
"name": "Cooo",
"features": [
{
"id": 36,
"name": "Colar",
"unit": "dB",