What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-16 22:40:13
Curl Shell Script To Purge Cache From Stackpath CDN
#!/usr/bin/env bash # Usage: # A simple shell script to purge Stackpath cdn cache using API and curl # command line. Tested on Ubuntu/Debian/RHEL/Fedora Linux and FreeBSD/macOS Unix # Syntax: # /path/to/stackpath.purge.sh https://your-domain/url # -----... Add solution -
Javascript 2021-11-07 15:46:11
js add query param
function update_query_parameters(key, val) { uri = window.location.href .replace(RegExp("([?&]"+key+"(?=[=&#]|$)[^#&]*|(?=#|$))"), "&"+key+"="+encodeURIComponent(val)) .replace(/^([^?&... Add solution -
Other 2021-11-04 12:01:14
Considering the Census Income data with response variable as Income(>50k and <=50k).
def load_dataset(path, urls): if not os.path.exists(path): os.mkdir(path) for url in urls: data = requests.get(url).content filename = os.path.join(path, os.path.basename(url)) with open(filename, "wb") as file:... Add solution -
Shell/Bash 2021-11-03 17:51:11
git push to another repository
Create a new repo at github. Clone the repo from fedorahosted to your local machine. git remote rename origin upstream git remote add origin URL_TO_GITHUB_REPO git push origin master Now you can work with it just like any other github repo. To pull in pa... Add solution -
Other 2021-10-27 15:11:09
how to install phpmyadmin with nginx on ubuntu 20.04
You need to do 6 steps, that are: 1. Install phpMyAdmin 2. Create Symbolic Link 3. Test phpMyAdmin 4. Create MySQL Superuser 5. Obscure phpMyAdmin URL (Recommended) 6. Secure phpMyAdmin (Recommended) Follow the Steps on this tutorial (it's updated and wo... Add solution