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 example_test | |
import ( | |
"context" | |
"math/big" | |
"testing" | |
"github.com/ethereum/go-ethereum/ethclient" | |
"github.com/ethereum/go-ethereum/rpc" |
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
func (c *client) FindActivities(ctx context.Context, query model.ActivitiesQuery) ([]*model.Activity, error) { | |
indexesQuery := model.IndexesQuery{ | |
Distinct: query.Distinct, | |
Owner: query.Owner, | |
Limit: query.Limit, | |
Cursor: query.Cursor, | |
Status: query.Status, | |
Direction: query.Direction, | |
StartTimestamp: query.StartTimestamp, | |
EndTimestamp: query.EndTimestamp, |
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 brewski() { | |
defaults export com.apple.dock ~/dockstate | |
brew update && brew upgrade --greedy && brew upgrade --cask --greedy && brew cleanup | |
defaults import com.apple.dock ~/dockstate | |
killall Dock | |
rm ~/dockstate | |
} |
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 | |
if [ ! "${1}" ] | |
then | |
echo "Usage : ${0} TARGET_HOST" | |
exit 1 | |
fi | |
TARGET_HOST="${1}" |
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
# For https://sspai.com/post/42787 | |
version: "3" | |
services: | |
postgres: | |
container_name: postgres | |
image: sameersbn/postgresql:latest | |
ports: | |
- 5432:5432 | |
network_mode: "bridge" | |
environment: |
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
delete | |
from | |
ttrss_entries | |
where | |
id in( | |
select | |
id | |
from | |
ttrss_entries | |
inner join ttrss_user_entries on |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |