Skip to content

Instantly share code, notes, and snippets.

View 24Ryou's full-sized avatar
🪐
always learning....

ali 24Ryou

🪐
always learning....
View GitHub Profile
@24Ryou
24Ryou / shortenURL.py
Last active November 11, 2022 18:24
make url shorten
import requests
from decouple import config
import urllib
def shortURL(URL):
key = config('CUTTLY_TOKEN')
parsedURL = urllib.parse.quote(URL)
r = requests.get('http://cutt.ly/api/api.php?key={}&short={}'.format(key, parsedURL))
data = r.json()
@24Ryou
24Ryou / randomPhoto.py
Last active November 11, 2022 18:26
source.unsplash get random photo
import requests
from pathlib import Path
# Download an image off unsplash without the api using python
def downloadimages(search_term, resolution, amount): # Define the function to download images
print(f"https://source.unsplash.com/random/{resolution}/?"+str(search_term)+", allow_redirects=True") # State the URL
path = Path('YourLocalPathForSaveFile')
# Loop for chosen amount of times
for x in range(int(amount)):

Heading

H1

H2

H3

Bold

bold text

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

Chrome Flags Backup

goto chrome://flags/ the press f12 and paste code then run backup() or restore()

function saveFile(filename, data) {
  return new Promise(resolve => {
    const blob = new Blob([data], { type: 'octet/stream' });
    const url = window.URL.createObjectURL(blob);
    const dom = document.createElement('a');
@24Ryou
24Ryou / laravel_xampp_setup.md
Last active July 4, 2022 13:08 — forked from bradtraversy/laravel_xampp_setup.md
Laravel Xampp setup on Mac and Windows

Laravel Xampp Setup (Windows & Mac)

Install Xampp

Install Xampp from https://www.apachefriends.org/index.html

  • Run the Xampp installer and open the Xampp control panel
  • Make sure that you enable the Apache and MySQL services
  • On mac you need to click "Start" on the Home tab, "Enable" on the Network tab and "Mount" on the Location Tab. Click "Explore" on the location tab to open your Xampp/Lampp folder

Install Composer

// "dependencies": {
// "axios": "^0.27.2",
// "cheerio": "^1.0.0-rc.12",
// "dotenv": "^16.0.1",
// "twilio": "^3.78.0"
// }
// need a .env file with:
// TWILIO_ACCOUNT_SID = "your account sid";