- Setting breakpoint
- Request http://127.0.0.1:8000/xxxx?XDEBUG_SESSION_START=yyyy
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
# In your config/initializers/active_enum.rb | |
# @see https://github.com/adzap/active_enum/pull/4 | |
# @example | |
# * ja.yml | |
# active_enum: | |
# user: | |
# sex: | |
# male: '男性' | |
# female: '女性' | |
# * user.rb |
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
<script type="text/javascript"> | |
//<![CDATA[ | |
$(function(){ | |
$("body a[href^='http://']").on("click", function(){ | |
url = $(this).attr('href'); | |
if(url.indexOf($(location).attr('hostname')) == -1) | |
{ | |
_gaq.push(['_trackEvent', 'Link', $(location).attr('href'), url]); | |
} | |
}); |
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
require 'benchmark' | |
n = %w(a b c d e f g h i j k l m n o p q r s t u v w x y z) | |
Benchmark.bm do |bm| | |
bm.report("each_with_index:") { | |
100000.times do | |
n.each_with_index do |o,i| | |
x = [o, i] | |
end | |
end |
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
#!/bin/bash | |
PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
SSH=33843 | |
HTTP=80,443 | |
IDENT=113 | |
NTP=123 | |
MYSQL=3306 | |
DHCP=67,68 | |
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
#!/usr/bin/env ruby | |
class Model | |
attr_accessor :a, :b, :c, :d, :e, :f, :g, :h | |
def attributes(arr) | |
@a = arr[0] | |
@b = arr[1] | |
@c = arr[2] | |
@d = arr[3] |
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
#!/usr/bin/env ruby | |
class Model | |
attr_accessor :genomes | |
def initialize(genomes) | |
@genomes = genomes | |
end | |
def score |
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
#!/usr/bin/env ruby | |
class Model | |
attr_accessor :genomes | |
def initialize(genomes) | |
@genomes = genomes | |
end | |
def score |
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
var fs = require('fs'); | |
//this is the path that QTNetwork classes uses for caching files for it's http client | |
//the path should be the one that has 16 folders labeled 0,1,2,3,...,F | |
exports.cachePath = '/path/to/phantomjs/cache/data/folder'; | |
//this is the extension used for files in the cache path | |
exports.cacheExtension = "d"; | |
//the resources that are to be saved |
We can't make this file beautiful and searchable because it's too large.
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
2018-1-30 13:53:45 1598242 257 NDN2L3HVD36ABYEH24NXBZA636VFTILNH5U3LY6K NC3BI3DNMR2PGEOOMP2NKXQGSAKMS7GYRKVA5CSZ 39303266313136643662323931393661 10 | |
2018-1-30 01:09:29 1596400 4100 NAGJG3QFWYZ37LMI7IQPSGQNYADGSJZGJRD2DIYA NC3BI3DNMR2PGEOOMP2NKXQGSAKMS7GYRKVA5CSZ 36303830316636306637336563646263 25 | |
2018-1-29 17:47:36 1594547 257 ND5HNZIIWA4IRCL55YVMWZEEWWZVSQ6HB4CP2Q4R NC3BI3DNMR2PGEOOMP2NKXQGSAKMS7GYRKVA5CSZ 4e42424a5144565a4b50454f4a4c434745493346515133494d375a564f4c4f565a3652434c465656 9000 | |
2018-1-29 08:46:22 1593197 257 NCOE7HHGYE4ZG3NKYY4LM477RW2QPTPAIYZPBYIX NC3BI3DNMR2PGEOOMP2NKXQGSAKMS7GYRKVA5CSZ 33306137393632316637633965313338 5 | |
2018-1-29 08:37:14 1593183 257 NCOE7HHGYE4ZG3NKYY4LM477RW2QPTPAIYZPBYIX NC3BI3DNMR2PGEOOMP2NKXQGSAKMS7GYRKVA5CSZ 5 | |
2018-1-26 23:37:20 1578866 257 NCP7UH5BT5OHPAWPFFVNR2453BNODJUZJ6777N3N NC3BI3DNMR2PGEOOMP2NKXQGSAKMS7GYRKVA5CSZ 61383734386330336433333130663635 509 | |
2018-1-26 22:28:12 1578388 257 NDMTUFGCJP2YO7FJAVIWEUTCHVKO5UF3L7OD2AQH NC3BI3DNMR2PGEOOMP2NKXQGSAKMS7GYRKVA5CSZ |
OlderNewer