Skip to content

Instantly share code, notes, and snippets.

View keikun17's full-sized avatar

Cakey | Buddy Magsipoc keikun17

View GitHub Profile
PR#100054321
Client : Mr. Someone
Quoted Specs : Milk
Offers :
Brand Specs Price Currency/Conversion PO?
---------- ---------- ------- ------------------- ---
Bearbrand Non Fat 10.00 USD @ 41.0 (410PHP) YES!(PO#100-3344)
Nido Fatty 5.00 PHP 300
@keikun17
keikun17 / gist:5409034
Last active December 16, 2015 08:49
Sigh... #ruby
{'key.with.dot': 'something'}
=> SyntaxError: (irb):7: syntax error, unexpected ':', expecting tASSOC
{'key.with.dot': 'something'}
^
{"key.with.dot": 'something'}
=> SyntaxError: (irb):8: syntax error, unexpected ':', expecting tASSOC
{key.with.dot: 'something'}
^
>> a = -> { puts "En Taro Adun" }
>> a.call
=> NoMethodError: undefined method 'a' for main
>> a
=> NoMethodError: undefined method 'a' for main
# This works
>> @a = -> { puts "Allahu Akbar" }
>> @a.call
=> "Allahu Akbar"
@keikun17
keikun17 / 英雄.rb
Last active December 21, 2015 01:29
class Hero
attr_accessor :名, :職, :ファイル, :健康
def initialize(名, 職, ファイル, 健康)
@名 = 名
@職 = 職
@ファイル = ファイル
@健康 = 健康
end
@keikun17
keikun17 / gist:8819331
Last active August 29, 2015 13:56
2014 PC
I sold my iMac (2011 model 27",i5, AMD 6970 video card, 12GB RAM) for PHP 45,000 and am building a new PC.
here are the specs and current price nila from online price checks :
Video Card : - AMD Sapphire R9-290X 4GB GDDR5 - PHP 24,850 Dynaquest Website price
CPU : - i5 4670 3.4-3.8 haswell - PHP 9,950 Dynaquest Website price
RAM : - Corsair Vengeance 16GB quad 1600 CL9 - PHP 6,500 Dynaquest Website price
MOBO : - Asrock Fatal1ty Z87 Killer (LGA 1150) - PHP 6,750 Dynaquest website price
HD : Western Digital 2tb - PHP 4,800 - Dynaquest Website price
Case : Generic - PHP 3,000 - budget
@keikun17
keikun17 / gist:9264032
Created February 28, 2014 02:32
Trying out snippets
# Does not work
'.source.rb':
'Ruby method':
'prefix': 'rm'
'body':
'def $1 end'
# Does not work either
'.text.rb':
'Ruby method':
@keikun17
keikun17 / keybase.proof.text
Created April 2, 2014 08:19
keybase proof
### Keybase proof
I hereby claim:
* I am keikun17 on github.
* I am keikun17 (https://keybase.io/keikun17) on keybase.
* I have a public key whose fingerprint is 7E4A 77B1 BD56 9D36 7E9B 023E 12E0 DDC3 E0EF 53BF
To claim this, I am signing this object:
@keikun17
keikun17 / mech_spec.rb
Last active August 29, 2015 14:06
Why i love Rspec 3.1
require 'spec_helper'
describe MWO::Mech do
describe '.all', vcr: {cassette_name: 'all_mechs'} do
subject { described_class.all }
let (:hbk4g) { an_object_having_attributes(name: 'hbk-4g', max_armor: 338, mech_id: 1, total_tons: 50, weight_class: 'Medium') }
let (:com3a) { an_object_having_attributes(name: 'com-3a', max_armor: 178, mech_id: 6, total_tons: 25, weight_class: 'Light') }
it "returns a collection of mechs collection" do
expect(subject).to include(an_instance_of(described_class))
@keikun17
keikun17 / gist:57bc5a3bafbdb714288b
Last active August 29, 2015 14:08
markdown backtick test

code snip something here gets cut pet


code snipp something here gets cut et

@keikun17
keikun17 / decorator.rb
Created February 24, 2015 17:26
decorator
# from https://github.com/keikun17/yapos/blob/master/app/decorators/decorator.rb
require 'delegate'
class Decorator < SimpleDelegator
include ActionView::Helpers
include ActionView::Context
include Rails.application.routes.url_helpers
def self.decorate_collection(arr)