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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<%= new Date().toLocaleString() %> |
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
let i = 0 | |
console.log(i) | |
i += 1 | |
console.log(i) | |
i++ | |
console.log(i) | |
const j = 0; |
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
mkdir ~/.npm-global | |
npm config set prefix '~/.npm-global' | |
code ~ | |
# Add this line to .profile, .zshrc, .bashrc or .bash_profile | |
# export PATH=~/.npm-global/bin:$PATH |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "v2.2", | |
"title": "Open Data API", | |
"description": "Latest Swagger specification for OpenData ATM Locator" | |
}, | |
"host": "developer.openbanking.org.uk", | |
"basePath": "/open-banking/v2.2", | |
"schemes": [ |
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
public String reverse(String input) { | |
if (input.length() == 1) return input; | |
String lastChar = input.substring(input.length()-1); | |
String rest = input.substring(0, input.length() - 1); | |
return lastChar + reverse(rest); | |
} |
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
public static String reverse(String input) { | |
String output = ""; | |
while(input.length() > 0) { | |
output += input.substring(input.length()-1); | |
input = input.substring(0, input.length() - 1); | |
} | |
return output; | |
} |
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 A | |
def self.foo val | |
define_method "foo" do | |
val | |
end | |
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
def valid_login(token = '') | |
interactable = Interaction.where(interactable_type: 'Ticket', key: 'wristband', value: token) | |
ticket = Ticket.find(interactable(:interactable_id)) | |
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
stage { 'preinstall': | |
before => Stage['main'] | |
} | |
class apt_get_update { | |
exec { 'apt-get -y update': } | |
} | |
class { 'apt_get_update': | |
stage => preinstall |
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 'bloomfilter' | |
bf = BloomFilter.new({ 'bits' => 0xff, 'salts' => %w(z A) }) | |
bf.add("foo") | |
bf.test("foo") | |
#=> true | |
bf.to_json |
NewerOlder