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> | |
<head> | |
<link rel="stylesheet" type="text/css" href="sample.css"> | |
<title>Sample file to test CSS</title> | |
</head> | |
<body> | |
<div class="main"> | |
<h1 class="center">This is CSS test file.</h1> | |
<div class="center brd background"> |
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 data = "hello cruel super cruel world is cruel here alas" | |
data_result = data.substring(0, data.lastIndexOf("cruel")) + data.substring(data.lastIndexOf("cruel") + "cruel".length, data.length) |
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 | |
def multifunc(msg, pos, b) | |
puts "Calculating: #{msg}" | |
b.call(pos) | |
end | |
puts multifunc("Fibonacci numb", 5, f = lambda { |n| (n == 0 || n == 1) ? n : (f.call(n-1) + f.call(n-2)) }) |
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 | |
# Return given number of even Integers | |
# that have number '4' within them | |
even_numbers = Enumerator.new do |yielder| | |
number = 0 | |
count = 1 | |
loop do | |
number += count | |
count += 1 |
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 MongoClient = require('mongodb').MongoClient; | |
MongoClient.connect('mongodb://localhost:27017/weather', function(err, db) { | |
if(err) throw err; | |
var map = function() { | |
emit(this["State"], 1); | |
} |
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
# Nerd Fonts for your IDE | |
# https://www.nerdfonts.com/font-downloads | |
brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font | |
brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font | |
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font | |
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font | |
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font | |
brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font | |
brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font |