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 | |
| set -euo pipefail | |
| # Directory setup | |
| APP_DIR="${HOME}/Applications" | |
| ICON_DIR="${HOME}/.local/share/icons" | |
| DESKTOP_DIR="${HOME}/.local/share/applications" | |
| BIN_DIR="${HOME}/.local/bin" |
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 | |
| # Step 1: Find the latest version of the .AppImage | |
| LATEST_APPIMAGE=$(ls -t $HOME/Applications/cursor-*.AppImage | head -n 1) | |
| echo "Latest AppImage: $LATEST_APPIMAGE" | |
| # Step 2: Update symlink to the latest version | |
| SYMLINK_PATH="$HOME/Applications/cursor.AppImage" | |
| ln -sf $LATEST_APPIMAGE $SYMLINK_PATH | |
| echo "Updated symlink to: $SYMLINK_PATH" |
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
| echo "step1- install kubectl,kubeadm and kubelet 1.28.0" | |
| curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
| echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
| echo "kubeadm install" | |
| sudo apt update -y | |
| sudo apt -y install vim git curl wget kubelet=1.28.0-00 kubeadm=1.28.0-00 kubectl=1.28.0-00 | |
| echo "memory swapoff" | |
| sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab |
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
| // Source: https://stackoverflow.com/questions/12321133/golang-random-number-generator-how-to-seed-properly | |
| package main | |
| import ( | |
| "crypto/sha1" | |
| "fmt" | |
| "math/rand" | |
| "time" | |
| ) |
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.
- Make sure you have registered a domain name.
- Sign up for CloudFlare and create an account for your domain.
- In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
- From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
- If you