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
module ControllerHelper | |
def secondsToHM(s) | |
Time.at(s).utc.strftime("%H:%M") | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Intelligence when show ads - Five times one, one time other</title> | |
<style type="text/css"> | |
#googleadsheader.ads1{ width:728px; height:90px } | |
#googleadsheader.ads2{ width:970px; height:250px } | |
</style> | |
<script type="text/javascript"> |
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
import getStyle from "./getStyleContent"; //ES6 | |
let styleContent = getStyle('.test'); | |
console.log(styleContent); | |
/* | |
Returns: | |
.test { |
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
-- path for this file: src/utils/ | |
function hex2rgb (hex) | |
local hex = hex:gsub("#","") | |
if hex:len() == 3 then | |
return (tonumber("0x"..hex:sub(1,1))*17)/255, (tonumber("0x"..hex:sub(2,2))*17)/255, (tonumber("0x"..hex:sub(3,3))*17)/255 | |
else | |
return tonumber("0x"..hex:sub(1,2))/255, tonumber("0x"..hex:sub(3,4))/255, tonumber("0x"..hex:sub(5,6))/255 | |
end | |
end |