Skip to content

Instantly share code, notes, and snippets.

View prio101's full-sized avatar
:shipit:
Making Stuff

Mahabub Islam Prio prio101

:shipit:
Making Stuff
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function divideBy(nominator, denominator){
@prio101
prio101 / hours_in_year.rb
Created March 8, 2015 16:44
These are ruby stuff
puts "Total hours in a year is:"
puts 365*24
@prio101
prio101 / chapter_9.rb
Created March 8, 2015 16:52
Chapter 9 code of Learn ruby hard way
# Here's some new strange stuff , remeber type it exactly
days = " Mon Tue Wed Thu Fri Sat Sun"
months = "Jan\n Feb\n Mar\n Apr\n Jun\n Jul\n Aug\n"
puts "Here are the days: #{days}"
puts "Here are the months: #{months}"
@prio101
prio101 / chapter_10.rb
Created March 8, 2015 17:29
Chapter 10 code of Learn ruby hard way
tabby_cat = "\t I'm tabbed in."
persian_cat = "I'm split\non a line ."
backslash_cat = "I'm \\a \\ cat."
fat_cat = """
I'll do a list:
\t* Cat food
\t* Fishes
@prio101
prio101 / cahpter_12.rb
Created March 8, 2015 17:55
Chapter 12 code of Learn ruby hard way
print "Give me a number?"
number = gets.chomp.to_i
bigger = number * 100
puts "A bigger number is #{bigger} ."
print "Give me another number: "
another = gets.chomp
number = another.to_i
@prio101
prio101 / cahpter_13.rb
Created March 8, 2015 18:03
Chapter 13 code of Learn ruby hard way
first , second , third = ARGV
puts "Your first variable is : #{first}"
puts "Your second variable is : #{second}"
puts "Your third variable is : #{third}"
@prio101
prio101 / yearSelect.php
Created April 3, 2015 04:54
Year Option maker in select form.
<select name="pickYear">
<option value="1980"<?php echo $pickYear == '1980' ? 'selected' == "selected" : '' ?>> Year :</option>
<?php
for ($i=date('Y'); $i >= 1980 ; $i--) {
$selected = '' ;
@prio101
prio101 / ChatPHP.php
Last active August 29, 2015 14:20
Chat Client Core
<?php
/*
* Start of the Base_chat
* Chat App based on PHP
* Author : Infobase Team
*/
class BaseChat{
// Database Connection
private $dbConnection ;
@prio101
prio101 / themeHelper.php
Created June 22, 2015 09:25
Theme Helper For The Codeigniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// CSS loader front-end
if( ! function_exists('theme_style_site')){
function theme_style_site($var = ''){
$url = base_url("assets/site/".$var);
return '<link rel="stylesheet" href="'.$url.'" >';
}
}
@prio101
prio101 / depth_checker.rb
Last active August 29, 2015 14:24
Depth Checker
n = 9
for i in 0..n
puts "Your Depth is #{i} !!!"
end