Skip to content

Instantly share code, notes, and snippets.

View parano's full-sized avatar
🍱

Chaoyu parano

🍱
View GitHub Profile
apiVersion: serving.yatai.ai/v1alpha2
kind: BentoDeployment
metadata:
name: demo
spec:
bento_tag: iris_classifier:3oevmqfvnkvwvuqj
resources:
limits:
cpu: 1000m
requests:
@parano
parano / Get notified when certain topics are being discussed on Hacker News.md
Last active March 31, 2022 09:24
Get notified when certain topics are being discussed on Hacker News

Get notified when certain topics are being discussed on Hacker News

This is a simple solution I use for getting notifications on my phone, whenever there is discussion happening on Hacker News related to topics that I am interested in. The solution is relying on the @newsyc20 twitter bot(or @newsyc50, @newsyc100, ...), twitter advanced search query and ifttt.com.

Here's an example of how I made ifttt to send me a mobile notification when there's Machine Learning, MLops, BentoML, releated discussion on hacker news that has reached 20 points:

  1. Create a twitter search query that filters content posted by @newsyc20, here's the query I used: [ML OR AI OR mlops OR "machine learning" OR "artificial intelligence" OR "deep learning" OR "bentoml" from:newsyc20](https://twitter.com/search?q=ML%20OR%20AI%20OR%20mlops%20OR%20%22machine%20learning%22%20OR%20%22artificial%20intelligence%22%20OR%20%22deep%20learning%22%20OR%20%22bentoml%22%20from%3A
@parano
parano / lookup.scpt
Last active May 10, 2023 18:41
Mac OS Quick Action: Lookup selected word in Google Translate
on run {input, parameters}
set phrase to input as string
set ui_lang to "en"
set from_lang to "auto"
set to_lang to "zh-CN"
set google_translate_url to "https://translate.google.com"
set google_translate_look_up_url to google_translate_url & "/?hl=" & ui_lang & "&sl=" & from_lang & "&tl=" & to_lang & "&text=" & phrase
@parano
parano / keybase.md
Created November 19, 2018 23:33
keybase.md

Keybase proof

I hereby claim:

  • I am parano on github.
  • I am parano (https://keybase.io/parano) on keybase.
  • I have a public key ASA7qOz0-eIXx7IQBf8qz9pkG95-zRyZxKyB6Pg0bzQEsAo

To claim this, I am signing this object:

We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 7 columns, instead of 4. in line 6.
reporting`campaign,da😄te,gr'oup,cre*&ative,type,na^$%me,valu()e
Belsomra-Q1-2016,2016-02-08,desktop,Always Awake? | Get The Information You Need To | Help Aid Your Insomnia Symptoms. | www.help-treat-insomnia.com,metric,Clicks,0
Belsomra-Q1-2016,2016-02-08,desktop,Always Awake? | Get The Information You Need To | Help Aid Your Insomnia Symptoms. | www.help-treat-insomnia.com,metric,Impressions,15
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Answers To Common Questions & | Learn About A Treatment Option Here | www.help-treat-insomnia.com,metric,Clicks,0
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Answers To Common Questions & | Learn About A Treatment Option Here | www.help-treat-insomnia.com,metric,Impressions,6
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Information About Insomnia | & A Treatment Option Today. | www.help-treat-insomnia.com,metric,Clicks,0
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Information Abou
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 7 columns, instead of 4. in line 6.
reporting_campaign,da😄te,group,cre*&ative,type,na^$%me,valu()e
Belsomra-Q1-2016,2016-02-08,desktop,Always Awake? | Get The Information You Need To | Help Aid Your Insomnia Symptoms. | www.help-treat-insomnia.com,metric,Clicks,0
Belsomra-Q1-2016,2016-02-08,desktop,Always Awake? | Get The Information You Need To | Help Aid Your Insomnia Symptoms. | www.help-treat-insomnia.com,metric,Impressions,15
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Answers To Common Questions & | Learn About A Treatment Option Here | www.help-treat-insomnia.com,metric,Clicks,0
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Answers To Common Questions & | Learn About A Treatment Option Here | www.help-treat-insomnia.com,metric,Impressions,6
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Information About Insomnia | & A Treatment Option Today. | www.help-treat-insomnia.com,metric,Clicks,0
Belsomra-Q1-2016,2016-02-08,desktop,Can't Sleep At Night? | Find Information About
@parano
parano / gist:3ccaeeb5974564f8132d
Last active August 29, 2015 14:05
Ruby on Rails Controller - Allow Origin Header
class ApplicationController < ActionController::Base
before_filter :cors_set_access_control_header
# other staff
private
def cors_set_access_control_header
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
headers['Access-Control-Request-Method'] = '*'
@parano
parano / gist:10683720
Created April 14, 2014 21:23
Recursively delete all the '.DS_Store' files under current folder and its sub-folders
sudo find ./ -name ".DS_Store" -depth -exec rm -f {} \;
@parano
parano / gist:9653676
Created March 19, 2014 23:19
Send random arrow keys using ruby, Mac OS X only
#!/usr/bin/ruby -w
def presskey(keycode)
system "osascript -e 'tell application \"System Events\" to key code #{keycode}'"
end
kVK_LeftArrow = 123
kVK_RightArrow = 124
kVK_DownArrow = 125
kVK_UpArrow = 126
@parano
parano / gist:9518893
Created March 12, 2014 23:29
Sending Keystrokes to OS X via osascript, in Ruby
#!/usr/bin/ruby -w
def presskey(keycode)
system "osascript -e 'tell application \"System Events\" to key code #{keycode}'"
end
kVK_LeftArrow = 123
kVK_RightArrow = 124
kVK_DownArrow = 125
kVK_UpArrow = 126