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
| #/bin/sh | |
| # read check.txt with strings to find in files in directory 'data' | |
| while read -r line; do | |
| if grep -q -wi "$line" data/* ; then ; else echo "$line - no"; fi; | |
| done <"check.txt" |
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
| # run graphite | |
| docker run \ | |
| --name graphite \ | |
| --restart=always \ | |
| -p 81:80 \ | |
| -p 2003-2004:2003-2004 \ | |
| -p 2023-2024:2023-2024 \ | |
| -p 8125:8125/udp \ | |
| -p 8126:8126 \ | |
| graphiteapp/graphite-statsd |
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
| package main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "reflect" | |
| ) | |
| type TestStruct struct { | |
| E error |
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
| #!/bin/bash | |
| # sudo apt install libnotify-bin | |
| vpn=`ifconfig | grep POINTOPOINT` | |
| if [ -z "$vpn" ] | |
| then | |
| notify-send -t 0 "VPN is down"; | |
| fi |
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
| var channels = document.querySelector('.channel_list_header_label'); | |
| var list = document.querySelector('#channel-list'); | |
| channels.addEventListener('click', function(e){ | |
| e.preventDefault();e.stopImmediatePropagation(); | |
| if (list.style.height != '20px') { | |
| list.style.height = '20px';list.style.overflowY = 'scroll'; | |
| } else { | |
| list.style.height = 'auto';list.style.overflowY = 'auto'; | |
| } |
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
| insert into cups(reg_id, code, is_enabled, created_at, updated_at ) | |
| select | |
| 1 as reg_id, | |
| UPPER(substr(md5(''||now()::text||random()::text), 1,8)) as code, | |
| true as is_enabled, | |
| to_date(now()::text, | |
| 'YYYY-MM-DD HH24:MI:SS') as created_at, | |
| to_date(now()::text, 'YYYY-MM-DD HH24:MI:SS') as updated_at | |
| from generate_series(1,4000000) on conflict DO NOTHING; |
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
| package main | |
| import ( | |
| "io" | |
| "os" | |
| "log" | |
| "os/exec" | |
| ) | |
| func main() { |
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
| const REFRESH_EXPIRED_MINUTES = 1 | |
| // somewhere (maybe in main.go) run: go WatchExpired(); go RefreshExpired(); | |
| func WatchExpired() { | |
| services.RClient.ConfigSet("notify-keyspace-events", "Ex") | |
| pub := services.RClient.PubSub() | |
| pub.PSubscribe("__key*__:*") | |
| debug, _ := conf.AppConfig.Bool("debug") |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| </head> | |
| <body> | |
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
| <div class="tabs"> | |
| <ul> | |
| <li v-for="int in 2" class="ui-tabs-tab ui-corner-top ui-state-default ui-tab" | |
| v-bind:class="[ picked == $index ? 'ui-state-active' : '']"> | |
| <label class="ui-tabs-anchor">Tab-${ $index } | |
| <input type="radio" name="tabs" value="${ $index }" v-model="picked" v-show="false"> | |
| </label> | |
| </li> | |
| </ul> | |
| <div v-for="w_type in wizard_types" v-show="( picked == $index )"> |
NewerOlder