Skip to content

Instantly share code, notes, and snippets.

View vinothpandian's full-sized avatar

Vinoth Pandian vinothpandian

View GitHub Profile
@vinothpandian
vinothpandian / RPSLS in Ruby
Created November 27, 2012 10:23
Rock Paper Scissors Lizard Spock in Ruby
def number_to_name(number)
case number
when 0
return "rock"
when 1
return "Spock"
when 2
return "paper"
when 3
return "lizard"
@vinothpandian
vinothpandian / RPSLS in Python
Created November 27, 2012 10:41
Rock Paper Scissors Lizard Spock in Python
# Rock Paper Scissors Lizard Spock
# to import random function for using random.randrange
import random
# function to convert number to name
def number_to_name(number):
if number == 0:
return "rock"
elif number == 1:
@vinothpandian
vinothpandian / RPSLS in Java
Created December 5, 2012 15:37
Rock Paper Scissors Lizard Spock in Java
package rpsls;
import java.util.Random;
/**
*
* @author vinoth
*/
public class Rpsls {
@vinothpandian
vinothpandian / pong.py
Created December 19, 2012 15:32
Classic Pong game in Python - using pygame
#PONG pygame
import random
import pygame, sys
from pygame.locals import *
pygame.init()
fps = pygame.time.Clock()
#colors
@vinothpandian
vinothpandian / rpsls.c
Created December 19, 2012 18:50
Rock Paper Scissors Lizard Spock in C
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char * number_to_name(int number)
{
switch(number)
{
case 0: return "rock";
@vinothpandian
vinothpandian / enterprise.py
Created December 22, 2012 14:00
Asteroids game in python using pygame module
#Enterprise pygame
import pygame, sys, os, random, math
from pygame.locals import *
pygame.mixer.pre_init()
pygame.init()
fps = pygame.time.Clock()
#colors
person('Charles',1945,m).
person('Anne',1950,f).
person('Andrew',1960,m).
person('Edward',1964,m).
person('Diana',1961,f).
person('Camilla',1947,f).
person('William',1982,m).
person('Henry',1984,m).
person('Mark',1948,m).
person('Timothy',1950,m).
{
"hosting": {
"public": "build",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
@vinothpandian
vinothpandian / gh-pages-deploy.md
Created May 7, 2018 17:13 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).