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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<script src=" "></script> | |
</body> |
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
function console_log( $data ){ | |
echo '<script>'; | |
echo 'console.log('. json_encode( $data ) .')'; | |
echo '</script>'; | |
} |
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
<article class="main-article"> | |
<figure> | |
<img src="" alt=""> | |
<figcaption></figcaption> | |
</figure> | |
<header> | |
<h1>Title</h1> | |
<h4>Short info</h4> |
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
const nodeList = document.getElementsByClassName('div'); | |
[].forEach.call(nodeList, function(element) { | |
console.log(element); // get list of array with classes | |
}; |
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 requests | |
def download(url): | |
file = url.split('/')[-1] | |
if file.split('.')[-1] != "mp3": | |
file += ".mp3" | |
r = requests.get(url, stream=True) | |
with open(file, 'wb') as f: |
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 requests | |
def file_down(url): | |
r = requests.get(url, stream=True) | |
if r.status_code == requests.codes.ok: # requests.codes.ok == 200 | |
with open("music.mp3", 'wb') as f: | |
f.write(r.content) | |
file_down("the_link_must_be_in_mp3_format.mp3") # example |
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,2,5,10].sort((a, b) => a- b) |
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
running = True | |
while running: | |
for e in pygame.event.get(): | |
if e.type == QUIT: | |
running = False |
OlderNewer