Skip to content

Instantly share code, notes, and snippets.

View Rican7's full-sized avatar
😮
My dotfiles just keep getting better... and its been OVER 10 YEARS NOW! ⌚😮🤯

Trevor N. Suarez Rican7

😮
My dotfiles just keep getting better... and its been OVER 10 YEARS NOW! ⌚😮🤯
View GitHub Profile
@Rican7
Rican7 / steez
Created December 16, 2014 20:59
The definition of steez.
*steez* (noun) \stˈēz\ - The state representing a particular style that is presented with an ostensible ease; style with ease.
> That backside air had some serious steez.
> Woah, that new design is just oozing steez.
*steezy* (adjective) \stˈēzē\ - Performed or presented with style while showing an apparent ease.
> That Stale Sandbech guy makes everything look steezy.
> I've got that trick down now, but I really gotta work on making it steezy.
@Rican7
Rican7 / oop-improved-go-version-of-codecademy-battleship.go
Created May 29, 2014 05:08
This is an "Object Oriented" rewrite of my already rewritten Go(lang) battleship game. I wanted to see how the OOP design worked in Go. Its different. Original, more functional approach: https://gist.github.com/Rican7/fac67bb68672be09678e
package main
import (
"bytes"
"fmt"
"math/rand"
"strings"
"time"
)
@Rican7
Rican7 / go-version-of-codecademy-battleship.go
Created May 23, 2014 19:06
A Go(lang) translation of an old Codecademy project originally used to learn Python. Original Python version: https://gist.github.com/Rican7/5941418
package main
import (
"fmt"
"math/rand"
"strings"
"time"
)
// Default configuration
@Rican7
Rican7 / private-property-access-2.php
Created February 4, 2014 00:09
This is a quick demonstration to show how PHP classes can access other classes/sub-classes private properties.
<?php
class Doge
{
private $name;
public function __construct($name)
{
$this->name = $name;
@Rican7
Rican7 / getting-tuple-like-params.php
Created January 15, 2014 22:58
In PHP there are multiple ways to get multiple return values in a "tuple-like" style. This GIST explores a few ways of doing so.
<?php
function return_me_data_pls() {
$params_to_return = array(
'count' => range(1,10),
'sum' => array_sum(range(1,10))
);
return $params_to_return;
}
@Rican7
Rican7 / php-build.bash
Created December 30, 2013 17:47
How to build PHP from source for testing/working on core
git checkout PHP-M.m # Replace M.m with the Major.minor versions (ex: PHP-5.4)
./buildconf --enable-maintainer-mode
./configure --prefix=/usr/local --enable-opcache=no --disable-all
make
make test
<?php
// Set the THINGS!!!!
$endpoint = 'http://colorapi.paramore.s2.paramoreredd.com/color-queue';
$color_id = 5; // Purple???
// Create the curl
$curl = curl_init();
// Set some options
@Rican7
Rican7 / oop-improved-dart-version-of-codecademy-battleship.dart
Last active December 28, 2015 09:49
This is an Object Oriented rewrite of my already rewritten Dart battleship game. I wanted to see how some of the OOP magic features worked. Very nice. Original, more functional approach: https://gist.github.com/Rican7/7480097
import "dart:math";
import "dart:io";
/// Represent a mark on a board
class Mark extends Point<int> {
// Properties
bool _checked = false;
String _representation;
@Rican7
Rican7 / dart-version-of-codecademy-battleship.dart
Last active December 28, 2015 09:39
A Dart(lang) translation of an old Codecademy project originally used to learn Python. PS: Dart's pretty boss. Original Python version: https://gist.github.com/Rican7/5941418
import "dart:math";
import "dart:io";
// Declare our game variables
List board;
Random randomizer;
int numOfRows = 5;
int numOfCols = 5;
int shipRow;
int shipCol;
<?php
class Dog {
public function paramSmart($val = null) {
if (null !== $val) {
return $this->paramSmart = $val;
}
return $this->paramSmart;
}