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
| /*Coverts OL into Table tags*/ | |
| (function (root) { | |
| var romanUpper = [ | |
| "", | |
| "C", | |
| "CC", | |
| "CCC", | |
| "CD", | |
| "D", | |
| "DC", |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin | Safari 14 transform: translate issue</title> | |
| <style id="jsbin-css"> | |
| .scroller { | |
| height: 400px; |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin | Safari 14 transform: translate issue</title> | |
| <style id="jsbin-css"> | |
| .scroller { | |
| height: 400px; | |
| width: 100%; |
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
| const getSelector = (node) => { | |
| let name = ""; | |
| if (node && node.localName) { | |
| name = node.localName; //tag name | |
| if (name === "html") { //DOM root FIXME: not sure with this | |
| return name; | |
| } | |
| if (node.hasAttribute && node.hasAttribute("id")) { //checking for id | |
| name += `#${node.getAttribute("id")}`; | |
| } else { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin | DOM Element Selector</title> | |
| </head> | |
| <body> | |
| <div id="hello"> | |
| <div class="hi"> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style> | |
| #content{ | |
| } | |
| h2{ |
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 rm /etc/X11/Xorg.conf ## no worry if the file does not exist | |
| sudo apt purge nvidia* | |
| sudo apt update | |
| sudo apt full-upgrade | |
| sudo ubuntu-drivers autoinstall |
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 smtplib | |
| from email.mime.text import MIMEText | |
| def send_email(): | |
| from_address = '[email protected]' | |
| to_addresses = [subscriber['email'] for subscriber in subscribers] | |
| print "Sending emails to ", ", ".join(to_addresses) | |
| msg = MIMEText(EMAIL_BODY, 'html') | |
| msg["Subject"] = "Some Subject" | |
| msg["From"] = from_address |
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
| # Assume we are in your home directory | |
| cd ~/ | |
| # Clone the repo from GitLab using the `--mirror` option | |
| $ git clone --mirror [email protected]:mario/my-repo.git | |
| # Change into newly created repo directory | |
| $ cd ~/my-repo.git | |
| # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks. |
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
| cat $1 | tr ' ' '\n' > temp # put all words to a new line | |
| echo -n > file2.txt # clear file2.txt | |
| for line in $(cat temp) # trace each line from temp file | |
| do | |
| # check if the current line is visited | |
| grep -q $line file2.txt | |
| if [ $? -ne 0 ] | |
| then | |
| count=`grep $line temp -o | wc -l` #count the number of words | |
| echo $line"@"$count >> file2.txt # add word and frequency to file |
NewerOlder