Skip to content

Instantly share code, notes, and snippets.

Linux (DEB and RPM distributions)
We've found a way to make the easy but infamous "curl|bash" more secure. If your system has GPG, try this:
curl -s 'https://pgp.mit.edu/pks/lookup?op=get&search=0x1657198823E52A61' | gpg --import && \
if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi
Some users may need to replace gpg with gpg2 in the above commands.
via curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@tecsyscom
tecsyscom / gist:de387852e534f55a9d3ff1978d97229d
Created June 1, 2017 10:45
SELinux enable, ssh 22 port?
SELINUX=enforcing would disable sshd non-22 port access until:
semanage port -a -t ssh_port_t -p tcp 12345
ethminer -G -F http://pool.ropsten.eth.cards:8888/0xdA80A0378b0B25111D48d9f8BE8EFb24b6B6e1Ee/rig1
@tecsyscom
tecsyscom / twitter_template.json
Created May 23, 2017 08:56
how to get an template example for twitter
{
"template": "twitter_elastic_example",
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"_default_": {
"_all": {
"enabled": true
@tecsyscom
tecsyscom / example_percentage_match.yaml
Last active May 23, 2017 08:44
example elastalert rules
name: Example Percentage Match
type: percentage_match
#es_host: localhost
#es_port: 9200
index: logstash-http-request-*
description: "95% of all http requests should be successful"
filter:
@tecsyscom
tecsyscom / config.yml
Created May 23, 2017 08:41
elastalert config file example
# This is the folder that contains the rule yaml files
# Any .yaml file will be loaded as a rule
rules_folder: example_rules
# How often ElastAlert will query Elasticsearch
# The unit can be anything from weeks to seconds
run_every:
minutes: 1
# ElastAlert will buffer results from the most recent
pip install --upgrade pip
sudo brew install pkg-config libffi\nexport PKG_CONFIG_PATH=/usr/local/Cellar/libffi/3.0.13/lib/pkgconfig/ # May change with libffi version\npip install cffi
sudo -H pip install python-dateutil
sudo pip install haxor-news --upgrade --ignore-installed six
sudo pip install awscli --force-reinstall --upgrade
sudo pip install awsebcli --upgrade --ignore-installed six
sudo pip install urllib3 --upgrade
pip install -U pbr
pip install functools32
@tecsyscom
tecsyscom / gist:1eb83fb857d453aaed1da27e04e1b982
Created May 22, 2017 04:39
switching between react-router inside of a kibana app plugin
Uncaught Invariant Violation: removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner). (https://localhost:5601/uqz/bundles/kibana-react-d3-app.bundle.js?v=8467:113731)
@tecsyscom
tecsyscom / config.json
Created May 21, 2017 10:14
open-ethereum-pool config
{
"threads": 2,
"coin": "eth",
"name": "main",
"proxy": {
"enabled": true,
"listen": "0.0.0.0:8888",
"limitHeadersSize": 1024,
"limitBodySize": 256,
const SearchResults = React.createClass({
propTypes: {
results: React.PropTypes.array
},
getDefaultProps () {
return { results: [] }
},
render () {
return (
<div className="search_results">