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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
token=$1 | |
url=$2 | |
day_count_save=$3 | |
#get all project from gitlab, limit 100 | |
all_project=`curl -s --header "Private-Token: ${token}" https://${url}/api/v4/projects?per_page=100` |
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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Sip demo</title> | |
</head> | |
<body> | |
<head><title>WebRT</title> | |
<style> |
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
function tz_calculate(crt,start_time,end_time) | |
--[[ The function receives the current time, the start time and the end time. | |
Counts the total time of work "job_time" and the difference between the end of work and the current time "calc". | |
Compares calc and job_time | |
If calc is less than or equal to job_time, then the iterator LE (<=) and the calc result are selected to select the taason band. | |
If job_time is greater than calc, then the GE iterator (> =) is selected, and the timezone is calculated as the difference (calc - job_time) | |
--]] | |
job_time = (end_time - start_time) | |
calc = (end_time - crt) | |
if (calc <= job_time) then |
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
function get_timing_cache(num,tz,cth,ctm) | |
-- Time Calculate delay and ttl queues options | |
-- num - number, tz - timezone(utc), cth - current time hour, ctm - current time mintute | |
num_time = tz + cth | |
if num_time < 9 then | |
delay = tonumber(((9 - num_time) * 60 * 60) -(ctm * 60)) | |
ttl = 43100 | |
return {delay,ttl} | |
elseif num_time >= 9 and num_time < 21 then | |
delay = 2 |
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
csv = require("csv") | |
f = require("fio").open("/usr/local/share/tarantool/data.csv", { "O_RDONLY"}) | |
for i, tup in csv.iterate(f) do | |
if tonumber(tup[1]) then | |
box.space.recall:upsert({tonumber(tup[1])},{{'=',1,0}}) | |
end | |
end |
NewerOlder