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
sudo apt install pdflatex texlive-fonts-extra texlive-fonts-recommended texlive-latex-base texlive-latex-extra |
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
class Test | |
def selectNode(shoeSize) | |
# Let's assume the cells is on a web page. And we are using | |
# selenium to parse the boxes. | |
# Here are some boilerplate code I found | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to "http://127.0.0.1/boxes" | |
# http://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/SearchContext.html#find_elements-instance_method | |
boxElements = driver.find_elements(:id,"boxes") |
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 | |
## Login | |
client = requests.session() | |
self.login(client) | |
def login(self, client, url, username, password): | |
client.get(url) |
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 | |
$root = $_SERVER['DOCUMENT_ROOT']; | |
chdir($root); | |
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
set_include_path(get_include_path().':'.__DIR__); | |
if(file_exists($root.$path)) | |
{ | |
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') | |
$path = rtrim($path,'/').'/index.php'; | |
if(strpos($path,'.php') === false) return false; |
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 | |
# uses imagemagick to stich together all images in a folder and | |
# then writes a css file with the correct offsets along with a | |
# test html page for verification that its all good | |
if [ $# -gt 0 ] | |
then | |
if [ $3 ] | |
then |