Skip to content

Instantly share code, notes, and snippets.

Avatar
💬
drink more water

samayo samayo

💬
drink more water
View GitHub Profile
@samayo
samayo / install-ruby.sh
Created Jun 20, 2016 — forked from lukearmstrong/install-ruby.sh
Install enough to get Ruby and Sass working on RHEL/CentOS
View install-ruby.sh
# lol redhat
su
# Install deps
yum install libyaml libyaml-devel openssl libxml2-devel bison libxslt-devel openssl-devel tcl tk libffi tcl-devel tk-devel libffi-devel
# Download Ruby
cd /usr/local/src/
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
tar -xvzf ruby-1.9.3-p392.tar.gz
@samayo
samayo / test.php
Created May 13, 2016
Created via API
View test.php
/** * FOO * @link Bar */
@samayo
samayo / test.php
Created May 13, 2016
Created via API
View test.php
<?php/** * FOO * @link Bar */declare(strict_types=1);
@samayo
samayo / test.php
Created May 13, 2016
Created via API
View test.php
<?php/** * FOO * @link Bar */declare(strict_types=1);
@samayo
samayo / test.php
Created May 13, 2016
Created via API
View test.php
<?php echo /** foo */ ?>
@samayo
samayo / test.php
Created May 13, 2016
Created via API
View test.php
<?php echo 'FOO' ?>
View gistable.php
<?php echo 1 + 1; ?>
@samayo
samayo / phpixie-stats.php
Created May 10, 2016 — forked from AndrewCarterUK/phpixie-stats.php
Script used to verify fraudulent installs on PHPixie.
View phpixie-stats.php
<?php
function getJsonPage($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
View daemon_example.py
""" An example of a Linux daemon written in Python.
Based on http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
The changes are:
1 - Uses file open context managers instead of calls to file().
2 - Forces stdin to /dev/null. stdout and stderr go to log files.
3 - Uses print instead of sys.stdout.write prior to pointing stdout to the log file.
4 - Omits try/excepts if they only wrap one error message w/ another.