Skip to content

Instantly share code, notes, and snippets.

View markuman's full-sized avatar
🐧
Linux Only - fail fast, move on

Markus Bergholz markuman

🐧
Linux Only - fail fast, move on
  • Lekker Energie GmbH
  • Berlin
View GitHub Profile
with commits as(
select
created_unix as time_sec,
count(user_id) as value,
DATE_FORMAT( FROM_UNIXTIME(created_unix),
'%Y-%m-%d' ) as dates
from
`action`
where
user_id = 1
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 6cac30040..308855a4f 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -43,6 +43,9 @@
{{end}}
{{end}}
<li><i class="octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}</li>
+ {{if eq .Owner.Name "m"}}
+ <li><iframe src="https://commits.git.osuv.de/d-solo/j2qx-N2mk/commits?orgId=1&panelId=3&theme=light" width="250" height="200" frameborder="0"></iframe></li>
{
"config": {
"animationDuration": 0,
"cellPadding": "3",
"cellRadius": 0,
"cellSize": "12",
"colLimit": null,
"displayLegend": true,
"domain": "auto",
"domainGutter": 2,
CREATE USER 'read_only_user'@'%' ;
UPDATE mysql.user SET Password=PASSWORD('some_password') WHERE User='read_only_user' AND Host='%' ;
GRANT Select ON gitea.`action` TO 'read_only_user'@'%' ;
FLUSH PRIVILEGES;
select
created_unix as time_sec,
count(user_id) as value,
'commits_per_day' as metric
from
`action`
where user_id = 1 and $__unixEpochFilter(created_unix)
group by DATE_FORMAT(FROM_UNIXTIME(created_unix), '%Y%m%d')
order by created_unix
set
@i = - 1;
with list_of_dates as(
SELECT
DATE( ADDDATE((
select
( DATE_SUB( CURRENT_DATE,
INTERVAL 1 MONTH ))),
INTERVAL @i := @i + 1 DAY )) AS dates
insert into test (`path`) values ('test.com/test2');
@markuman
markuman / gitlab-ci.yml
Created April 24, 2018 16:09
gitlab-ci.yml global before
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
docker run --rm busybox nslookup google.de
docker network create -d overlay --attachable testnetzwerk
docker run --rm --network testnetzwerk busybox nslookup google.de
<!-- my-component.vue -->
<template>
<div>This will be pre-compiled</div>
</template>
<script src="./my-component.js"></script>
<style src="./my-component.css"></style>