This file contains 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
import { ImageResponse } from 'workers-og' | |
export default { | |
async fetch(request) { | |
let param = request.url.split('/').pop() || '@_irfanfadilah' | |
if (param.length > 50) { | |
param = 'Text Too Long!' | |
} |
This file contains 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
1. Install Redis | |
2. Start and Enable: | |
- sudo systemctl start redis-server | |
- sudo systemctl enable redis-server | |
3. Update Config: | |
- bind 0.0.0.0 | |
- protected-mode no | |
- maxmemory 100mb | |
- maxmemory-policy allkeys-lfu | |
4. Set ACL and disable default user in Config: |
This file contains 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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+alt+left", | |
"command": "-workbench.action.moveEditorToPreviousGroup" | |
}, | |
{ | |
"key": "ctrl+alt+right", | |
"command": "-workbench.action.moveEditorToNextGroup" | |
}, |
This file contains 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
# Bash | |
alias bo="nano ~/.bashrc" | |
alias bu="source ~/.bashrc" | |
alias ba="nano ~/.bash_aliases" | |
# Kubectl | |
kupods() { kubectl get pods --namespace=$1; } | |
kubash() { kubectl exec $2 --namespace=$1 -it bash; } | |
kulogs() { kubectl logs --follow $2 --namespace=$1; } | |
kudesc() { kubectl describe pods --namespace=$1 $2; } |
This file contains 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
{ | |
"editor.tabSize": 2, | |
"editor.smoothScrolling": true, | |
"editor.minimap.enabled": false, | |
"files.insertFinalNewline": true, | |
"files.trimFinalNewlines": true, | |
"files.trimTrailingWhitespace": true, | |
"workbench.startupEditor": "none", | |
"editor.copyWithSyntaxHighlighting": false, | |
"editor.matchBrackets": "never", |
This file contains 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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
This file contains 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
var _URL = window.URL || window.webkitURL; | |
$("#article_image").change(function(){ | |
var file, img, reader; | |
if ((file = this.files[0])) { | |
img = new Image(); | |
img.onload = function(){ | |
if ( (this.width < 960) || (this.height < 300) ) { | |
alert("Image must be larger than 960x300 pixels!") | |
} else { |
This file contains 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
Show hidden characters
{ | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme", | |
"default_line_ending": "unix", | |
"drag_text": false, | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 10, | |
"ignored_packages": ["Vintage"], | |
"line_padding_bottom": 1.5, | |
"line_padding_top": 1.5, | |
"material_theme_accent_scrollbars": true, |
This file contains 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
Ubuntu: | |
sudo apt-get install dnsmasq | |
sudo gedit /etc/dnsmasq.conf | |
add: address=/rails.env/127.0.0.1 | |
sudo service dnsmasq restart | |
Mac: | |
brew install dnsmasq |
This file contains 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
client_id = "xxxxxxxxxxxxxxxxxxxx" | |
client_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
redirect_uri = "http://localhost:3000/callback/dailymotion" | |
# Ask user permission | |
get = "https://www.dailymotion.com/oauth/authorize?response_type=code&client_id=#{client_id}&redirect_uri=#{redirect_uri}&scope=manage_videos" | |
# Get access_token & refresh_token |
NewerOlder