Skip to content

Instantly share code, notes, and snippets.

Greg Nilchee gnilchee

  • Athlinks
  • Woodinville, WA
Block or report user

Report or block gnilchee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gnilchee
gnilchee / site_checker.cr
Created Oct 31, 2017
Crystal-Lang example using http/client, logger and option_parser
View site_checker.cr
require "http/client"
require "option_parser"
require "logger"
destination = "changeme"
help = ""
log = Logger.new(STDOUT)
log.level = Logger::INFO
@gnilchee
gnilchee / rest_api.go
Created Oct 2, 2017
Some simple get examples using SendGrid's REST against Github API
View rest_api.go
package main
import (
"fmt"
"encoding/json"
"github.com/sendgrid/rest"
)
func main() {
// var
@gnilchee
gnilchee / output_to_html_with_syntax.go
Created Sep 25, 2017
Take multiline code in a variable and output to stdout html that has code in syntax highlighted in given format
View output_to_html_with_syntax.go
package main
import (
"fmt"
"os"
"github.com/alecthomas/chroma/quick"
)
func main() {
my_code := `package main
@gnilchee
gnilchee / datadog_api_example.go
Created Sep 19, 2017
A few examples of different calls using zorkian's go datadog api library
View datadog_api_example.go
package main
import (
"os"
"log"
"gopkg.in/zorkian/go-datadog-api.v2"
)
func main() {
// Get api and app key from environment var
@gnilchee
gnilchee / get_urls.py
Created Sep 4, 2017
python3 concurrency example with blocking requests
View get_urls.py
#!/usr/bin/env python
import requests
my_urls = [
'https://google.com/',
'https://youtube.com/',
'https://facebook.com/',
'https://wikipedia.org/',
'https://yahoo.com/',
'https://reddit.com/',
View ca-config.json
{
"signing": {
"default": {
"expiry": "17520h"
},
"profiles": {
"2yr-server": {
"expiry": "17520h",
"usages": [
"signing",
@gnilchee
gnilchee / dd_stats_sender.py
Created Jul 1, 2017
send custom stats to datadog
View dd_stats_sender.py
#!/usr/bin/env python
from datadog import statsd
import requests
import time
def get_endpoint_status(url):
response = requests.get(url)
resp_time_miliseconds = response.elapsed.microseconds / 1000
result = {'status_code': response.status_code, 'response_time': resp_time_miliseconds}
return result
@gnilchee
gnilchee / hello_machine_learning.py
Last active Jun 30, 2017
Easy hello world machine learning example
View hello_machine_learning.py
#!/usr/bin/env python3
from sklearn import tree
###################
## Texture
# smooth = 1
# bumpy = 0
## label
# apple = 0
# orange = 1
##################
View keybase.md

Keybase proof

I hereby claim:

  • I am gnilchee on github.
  • I am gnilchee (https://keybase.io/gnilchee) on keybase.
  • I have a public key whose fingerprint is 560E C47C A317 9EB1 2464 B925 8B8E DC3B 39CE 1964

To claim this, I am signing this object:

@gnilchee
gnilchee / wifesnooping.py
Last active May 25, 2017
Fun script to print to console when device with matching mac address makes a DHCP request
View wifesnooping.py
#!/usr/bin/env python3
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
from datetime import datetime, timedelta
from twilio.rest import Client
account_sid = "<twilio account sid>"
auth_token = "<twilio auth token>"
client = Client(account_sid, auth_token)
You can’t perform that action at this time.