$ docker
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
| <?php | |
| /* | |
| JSON list of all images files in current directory | |
| */ | |
| $dir = "."; | |
| $dh = opendir($dir); | |
| $image_files = array(); |
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
| <div class="container"> | |
| <div class="feature"> | |
| <figure class="featured-item image-holder r-3-2 transition"></figure> | |
| </div> | |
| <div class="gallery-wrapper"> | |
| <div class="gallery"> | |
| <div class="item-wrapper"> | |
| <figure class="gallery-item image-holder r-3-2 active transition"></figure> |
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
| // Construct Single Node | |
| class Node { | |
| constructor(data, next = null) { | |
| this.data = data; | |
| this.next = next; | |
| } | |
| } | |
| // Create/Get/Remove Nodes From Linked List | |
| class LinkedList { |
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
| import requests | |
| from bs4 import BeautifulSoup | |
| from csv import writer | |
| response = requests.get('http://codedemos.com/sampleblog/') | |
| soup = BeautifulSoup(response.text, 'html.parser') | |
| posts = soup.find_all(class_='post-preview') |
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 | |
| # ECHO COMMAND | |
| # echo Hello World! | |
| # VARIABLES | |
| # Uppercase by convention | |
| # Letters, numbers, underscores | |
| NAME="Bob" | |
| # echo "My name is $NAME" |
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
| <?php | |
| // See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html | |
| // Start a session (which should use cookies over HTTP only). | |
| session_start(); | |
| // Create a new CSRF token. | |
| if (! isset($_SESSION['csrf_token'])) { | |
| $_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32)); | |
| } |
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
| (async function () { | |
| let interval = null; | |
| let counter = 0; | |
| const fetch = async function(url) { | |
| try { | |
| return await $.ajax(url, {dataType: "json"}); | |
| } catch (error) { | |
| console.log('Error:', error); | |
| } |
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
| function post_sync(url, data) { | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open("POST", url, false); | |
| xhr.setRequestHeader('Content-Type', 'application/json'); | |
| xhr.send(JSON.stringify(data)); | |
| return xhr; | |
| } | |
| console.log("Running script, this may take up to 2 minutes"); | |
| post_sync("/carl/api/do-event",{ | |
| velocity:"0", gravity:"0.25",jump:"-4.6",event:"start",position:"121.324",rotation:"0",score:"0",pipeheight:"200" |
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
| Step1: | |
| https://www.youtube.com/watch?v=fZDUxJ-7Y4A | |
| Step2 | |
| https://www.youtube.com/watch?v=epDAcSX3mpk | |
| Step3 | |
| https://www.youtube.com/watch?v=J1oFKE8Z8wY |
OlderNewer