This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -new -sha1 -newkey rsa:1024 -nodes -keyout client.key -out request.pem | |
mkdir -p demoCA/newcerts | |
touch demoCA/index.txt | |
touch demoCA/index.txt.attr | |
vim demoCA/serial | |
sudo openssl ca -cert /etc/ssl/certs/ssl-cert-snakeoil.pem -keyfile /etc/ssl/private/ssl-cert-snakeoil.key -policy policy_anything -out signed.pem -infiles request.pem | |
sudo openssl pkcs12 -export -in signed.pem -inkey client.key -certfile /etc/ssl/certs/ssl-cert-snakeoil.pem -name "testp12" -out test-p12.p12 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="field"> | |
<input id="ballot_city_quezon_city" name="ballot[city]" type="radio" value="Quezon City" /> | |
<label for="ballot_city_quezon_city">Quezon City</label> | |
</div> | |
<div class="field"> | |
<input id="ballot_city_manila" name="ballot[city]" type="radio" value="Manila" /> | |
<label for="ballot_city_manila">Manila</label> | |
</div> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node | |
attr_accessor :value, :next | |
def initialize(value) | |
@value = value | |
end | |
end | |
class LinkedList | |
attr_accessor :head, :tail | |
def initialize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Synapse | |
constructor: (@sourceNeuron, @destNeuron) -> | |
@prevWeight = @weight = (Math.random() * 2.0) - 1.0 | |
class Neuron | |
learningRate: 1.0 | |
momentum: 0.3 | |
constructor: -> | |
@synapsesIn = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'bzx/vim-theme-pack' | |
Bundle 'ap/vim-css-color' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Animal | |
def initialize(name, age) | |
@name, @age = name, age | |
end | |
def getName | |
@name | |
end | |
def getAge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stemmer | |
# Custom implementation of the Porter2 stemming algorithm | |
# http://snowball.tartarus.org/algorithms/english/stemmer.html | |
@getStems: (text) -> | |
exclusionList = ["", ",", "/", "&", "of", "the", "by", "a", "*", "-", "'", "'s", "=", ">", "s'", "\"", "~", "and", "with", "for", "in", "500ml", "to", "at", "or", "n", "x", "pcs"] | |
stems = (@stem(word) for word in text.split /[ ,()!:@\/]/) | |
(word for word in stems when word not in exclusionList and word.search(/^[\d]+(\.[\d]+)?"?$/) == -1) | |
@stem: (word) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//logic shamelessly copied from https://github.com/imulus/retinajs | |
jQuery(document).ready(function() { | |
var replaceRetina = function(elem) { | |
if (elem.complete) { | |
var src = elem.src; | |
var path_segments = src.split('.'); | |
var path_without_extension = path_segments.slice(0, (path_segments.length - 1)).join("."); | |
var extension = path_segments[path_segments.length - 1]; | |
elem.setAttribute('width', elem.offsetWidth); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bry-temp@webgeek:~# ab -n 1000 -c 20 http://webgeek.ph/devcup/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking webgeek.ph (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bry@linode:~$ ab -n 1000 -c 20 http://pd.bryanbibat.net/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking pd.bryanbibat.net (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
OlderNewer