Skip to content

Instantly share code, notes, and snippets.

View ron4stoppable's full-sized avatar
😎

Rohan Shewale ron4stoppable

😎
View GitHub Profile
/* Body ------------------------------------------------------------ */
::-moz-selection,
::selection {
background-color: #600CAC;
color: #fff;
}
/* this will not work */
@ron4stoppable
ron4stoppable / Tetris clone QR code
Created October 1, 2013 18:33
Tetris: The Grand Master clone in under 2953 bytes. The source-code fits into a QR Code.[C++]
QR Code: http://i.imgur.com/Rcb7brC.jpg
Windows Binary: https://dl.dropboxusercontent.com/u/6430099/MiniTris.zip
Source:
// TETRIS Move W,A,S,D Rotate U,I
#include<SDL.h>
#include<stdlib.h>
#define c if
#define q for
#define Z return
<?php
$link = mysqli_connect('localhost', 'user', 'password'); //replace user with root of the user name
if (!$link)
{
$output = 'Unable to connect to the database server.'; // If connection to MySQL server fails
include 'output.html.php'; // error message will be stored $output
exit();
}
if (!mysqli_set_charset($link, 'utf8'))
@ron4stoppable
ron4stoppable / TriangleFlower
Created May 13, 2015 17:02
TriangleFlower by Radimir Bobev
float tri_angle;
float radius = 150;
int max_tris = 90;
color tri_colors[] = new color[max_tris];
float lower_threshold = 0.2;
float upper_threshold = 0.8;
void setup() {
size( 400, 400, P2D );
smooth(8);
@ron4stoppable
ron4stoppable / dabblet.css
Last active March 28, 2016 07:56
Center with inline block
/**
* Center with inline block
*/
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
.row{
width: 100%;
text-align: center;
}
.cols{
/* margin: 0 auto; */
/*
* Horizontally center a div within a div using CSS
*/
#inner-new {
margin: 0 auto;
}
/*
* If you are targeting IE8+, it might be better to have this instead:
@ron4stoppable
ron4stoppable / dabblet.css
Last active March 28, 2016 07:58
center div with box model
/**
* center div with box model
*/
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
.row{
width:100%;
/* Firefox */
display:-moz-box;
-moz-box-pack:center;
/*
* Dabblet: Font Awesome Icon test
*/
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
/* just to center align div */
.row{
width: 100%;
text-align: center;
}
.cols{
@ron4stoppable
ron4stoppable / migration create session
Created April 21, 2016 13:09
CI 3.0 Migrations to Create Session
<?php
class Migration_Create_Sessions extends CI_Migration {
public function up()
{
$fields = array(
'id VARCHAR(40) DEFAULT \'0\' NOT NULL',
'ip_address VARCHAR(45) DEFAULT \'0\' NOT NULL',
'timestamp INT(10) unsigned DEFAULT 0 NOT NULL',
@ron4stoppable
ron4stoppable / Migration Create Sessions
Last active June 28, 2018 11:07 — forked from harris21/Migration Create Sessions
Create CodeIgniter Sessions Migration
class Migration_Create_Sessions extends CI_Migration {
// The session table structure changed for CI 3.0
public function up()
{
$fields = array(
'id VARCHAR(40) DEFAULT \'0\' NOT NULL',
'ip_address VARCHAR(45) DEFAULT \'0\' NOT NULL',
'timestamp INT(10) unsigned DEFAULT 0 NOT NULL',
'data blob NOT NULL'