Initially taken by Niko Matsakis and lightly edited by Ryan Levick
- Introductions
- Cargo inside large build systems
- FFI
- Foundations and financial support
| # Change Xcode version in GitHub Actions | |
| As of today (2019-08-21) I haven't found any documentation on changing Xcode versions when | |
| using GitHub actions. So I checked the applications folder and everything we need is | |
| already there. 🤩 | |
| ``` | |
| > ls -n /Applications/ | grep Xcode* | |
| lrwxr-xr-x 1 0 80 30 Aug 2 19:31 Xcode.app -> /Applications/Xcode_10.2.1.app | |
| drwxr-xr-x 3 501 20 96 Oct 20 2018 Xcode_10.1.app |
| # Download entire webpage including all javascript, html, css of webpage. Replicates ctrl+s when on a webpage. | |
| from selenium.webdriver.common.action_chains import ActionChains | |
| from selenium.webdriver.common.keys import Keys | |
| def save_current_page(): | |
| ActionChains(browser).send_keys(Keys.CONTROL, "s").perform() |
| $URL=(Invoke-WebRequest -UseBasicParsing https://www.java.com/en/download/manual.jsp).Content | %{[regex]::matches($_, '(?:<a title="Download Java software for Windows Online" href=")(.*)(?:">)').Groups[1].Value} | |
| Invoke-WebRequest -UseBasicParsing -OutFile jre8.exe $URL | |
| Start-Process .\jre8.exe '/s REBOOT=0 SPONSORS=0 AUTO_UPDATE=0' -wait | |
| echo $? |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| var data | |
| var formId = 'form' | |
| function drawForm() { | |
| if (!data) return | |
| var outputEl = document.getElementById(formId); |
| { | |
| "emojis": [ | |
| {"emoji": "👩👩👧👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👧👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👦👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👨👩👧👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z |
abs(float) - Returns the absolute value of a given float.
Example: abs(1) returns 1, and abs(-1) would also return 1,
whereas abs(-3.14) would return 3.14. See also the signum function.
basename(path) - Returns the last element of a path.
base64decode(string) - Given a base64-encoded string, decodes it and
returns the original string.
| const puppeteer = require('puppeteer'); | |
| (async () => { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| // Adjustments particular to this page to ensure we hit desktop breakpoint. | |
| page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
| await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
| require 'sidekiq/api' | |
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear |
| # Please note, the commands below will create unreadable files and should be | |
| # used for testing file size only. If you're looking for something that has | |
| # lines in it, use /dev/urandom instead of /dev/zero. You'll then be able to | |
| # read the number of lines in that file using `wc -l large-file.1mb.txt` | |
| # Create a 1MB file | |
| dd if=/dev/zero of=large-file-1mb.txt count=1024 bs=1024 | |
| # Create a 10MB file | |
| dd if=/dev/zero of=large-file-10mb.txt count=1024 bs=10240 |