cat > /etc/yum.repos.d/prometheus.repo <<-GRAFANA
[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/7/\$basearch
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
more readable format | |
pragma solidity ^0.4.24; | |
interface FoMo3DlongInterface { | |
function airDropTracker_() external returns (uint256); | |
function airDropPot_() external returns (uint256); | |
function withdraw() external; | |
} |
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 channel | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
func ExampleUnbufferedSend() { | |
c1 := make(chan string) |
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
pragma solidity ^0.4.10; | |
// Update: Just use HardHat's: https://github.com/nomiclabs/hardhat/blob/master/packages/hardhat-core/console.sol | |
// Enables event logging of the format `console.log('descriptive string', variable)`, | |
// without having to worry about the variable type (as long as an event has been declared for that type in the | |
// Console contract. | |
contract Console { | |
event LogUint(string, uint); |
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
local ffi = require("ffi") | |
local awesome = ffi.load("./awesome.so") | |
ffi.cdef([[ | |
typedef long long GoInt64; | |
typedef unsigned long long GoUint64; | |
typedef GoInt64 GoInt; | |
typedef GoUint64 GoUint; | |
typedef double GoFloat64; |
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 ( | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"os" |
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 ( | |
"fmt" | |
"net/http" | |
"time" | |
"golang.org/x/net/context" | |
"github.com/husobee/backdrop" |
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
-- Setup Redis connection | |
local redis = require "resty.redis" | |
local red = redis:new() | |
local ok, err = red:connect("127.0.0.1", "6379") | |
if not ok then | |
ngx.log(ngx.INFO, "REDIS: Failed to connect to redis: " .. err) | |
return ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) | |
end |
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 | |
# | |
# nginx - this script starts and stops the nginx daemin | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# pidfile: /usr/local/nginx/logs/nginx.pid |
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 | |
# Set PHP-FPM pool workers CPU affinity so each worker gets one CPU core | |
# Note that FPM recycles threads, so you'll need to run this on cron periodically | |
# Author: Steve Kamerman | |
CPUS=$(grep -c CPU /proc/cpuinfo) | |
FPM_PIDS=$(ps auxw | grep php-fpm | grep pool | awk '{ print $2; }') | |
if [ "$FPM_PIDS" = "" ]; then |
NewerOlder