Skip to content

Instantly share code, notes, and snippets.

View axsuul's full-sized avatar

James Hu axsuul

View GitHub Profile
@axsuul
axsuul / controllers.application.js
Created February 27, 2018 01:46 — forked from samselikoff/mirage.config.js
Mirage dev boilerplate
import Ember from 'ember';
export default Ember.Controller.extend({
});
@axsuul
axsuul / README-Template.md
Created January 7, 2018 22:34 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@axsuul
axsuul / gist:6924664
Last active December 25, 2015 05:29 — forked from phoet/gist:6916641
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
namespace :db do
namespace :seed do
desc "Adaug medici in baza de date"
task :medici => :environment do
Medic.create!(:nume => "Serafinceanu", :prenume => "Cristian", :cod_parafa => "282828")
Medic.create!(:nume => "Craciun", :prenume =>"Anne-Marie", :cod_parafa =>"999")
end
end
end
@axsuul
axsuul / hanman.py
Created September 10, 2012 02:58
hangman
#Hangman
import random
words = ["apple", "banana", "pen", "cat", "dog", "bee", "pig"]
print "Welcome to the Hangman game. You will have six chances to guss my secret word correctly. Good luck!"
word = words[random.randint(0,len(words)-1)]
def dash(word):
list = []
for i in word:
list.append("_")
@axsuul
axsuul / hanman.py
Created September 10, 2012 02:35
hangman
#Hangman
import random
words = ["apple", "banana", "pen", "cat", "dog", "bee", "pig"]
print "Welcome to the Hangman game. You will have six chances to guss my secret word correctly. Good luck!"
word = words[random.randint(0,len(words)-1)]
def dash(word):
list = []
for i in word:
list.append("_ ")
resources :studentinfos do
get ':type' => 'studentinfos#type', constraints: { type: /\d+/ }
end
class OtoplastikCustomer < Customer
def otoplastik?
true
end
def prices(article)
query = lambda do |merchant_code|
OtoplastikArticlePrice.where("otoplastik_article_id = ? AND merchant_code = ?", article.id, merchant_code).order("minimum DESC")
end
@axsuul
axsuul / event_types.rb
Created August 22, 2012 00:21 — forked from drewdeponte/event_types.rb
Thrift auto generated event types file.
#
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
require 'exception_types'
require 'shared_types'
FactoryGirl.define do
factory :neutral_account, class: FinancialAccounting::Update::Neutral::Account do
load_sequence { FactoryGirl.generate(:sn) }
loaded_at { Time.now }
recorded_at { Time.now }
created_at { Time.now }
updated_at { Time.now }
factory :valid_neutral_account do
association :custodian, factory: :custodian