This file contains hidden or 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 MyClass | |
class << self | |
def with_inline_statement | |
result = nil | |
response = result.first if(result = item).exists? | |
response | |
end | |
def with_multiline_statement | |
if (result = item).exists? | |
response = result.first |
This file contains hidden or 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/sh -e | |
# upstart-job | |
# | |
# Symlink target for initscripts that have been converted to Upstart. | |
set -e | |
INITSCRIPT="$(basename "$0")" | |
JOB="vsftpd" |
This file contains hidden or 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 Foo | |
METHODE_NAMES = ['problems', 'maintenances', 'journeys'] | |
class << self | |
def get_var(name, hsh) | |
ApiRequest.new(params: {account_id: hsh[:email], vin: hsh[:vin]}, | |
url: "vehicles/#{hsh[:vin]}/#{name}", verb: "get").get | |
end | |
METHODE_NAMES.each do name |
This file contains hidden or 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
// | |
using('#searchMessage').expect(binding('query')).toBe('nexus'); | |
// VS | |
using('#searchMessage').expect(binding('query').toBe('nexus')); // => WRONG, but test skipped |
This file contains hidden or 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
def with_respond(object) | |
object.respond_to?(:first) | |
end | |
def with_array(object) | |
object.kind_of? Array | |
end | |
class Aclass |
This file contains hidden or 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 Wmit::Event < ActiveRecord::Base | |
end |
This file contains hidden or 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
<?php | |
// office/lib/hooks/Client.php | |
class Client_hook | |
{ | |
public static function alterLinkFromTables($links,$do) | |
{ | |
require_once 'lib/CustomUtils.php'; |
This file contains hidden or 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
ruby -ryaml -e 'begin | |
YAML.load(STDIN.read) | |
p "Syntax OK" | |
rescue | |
print "ERROR: ",$!, "\n" | |
end | |
' |
This file contains hidden or 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
= t('people.list.on_twitter', :link => link_to("@#{list_item.twitter}", "https://twitter.com/#{list_item.twitter}")).html_safe |
NewerOlder