- A Pen is worth a thousand docs.
- Be the developer your linter thinks you are.
- How do you comfort a JavaScript bug? You console it!
- How would you React if I said I love Vue?
- If a groundhog inspects their Web Component, do they see their Shadow DOM?
- If you get tired, be like an AJAX request and REST.
- If you want to
flex
your skills and go off thegrid
, try coding a layout withfloat
. - Keep friends close and formatters closer.
- Keep the
<main>
thing the<main>
thing. - Knock knock! Race condition. Who's there?
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
# Based on Gary Lee's code: | |
# https://gist.github.com/GaryLee/d1cf2089c3a515691919 | |
# https://stackoverflow.com/a/33856172/2203482 | |
def run_as_admin(argv=None): | |
import ctypes | |
shell32 = ctypes.windll.shell32 | |
if argv is None and shell32.IsUserAnAdmin(): | |
return True | |
import sys |
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
// Find first value matching a condition | |
arr.find(e => someCondition(e)) | |
// e.g. | |
[12, 5, 8, 130, 44].find(i => i > 100) // 130 | |
[7, 3, 9, 5, 6, 1].find(i => i % 2 == 0) // 6 | |
// Remove FIRST occurrence of value from array | |
let index = arr.indexOf(value) | |
if (index > -1) { | |
arr.splice(index, 1) |
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
*{ | |
box-shadow: none !important; | |
transition: none !important; | |
-webkit-transition: none !important; | |
-moz-transition: none !important; | |
-o-transition: none !important; | |
} | |
@media /* Large screen, non-retina */ | |
only screen and (min-width: 1000px) { |
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
#!/bin/bash | |
# setup | |
FILES=name_of_file_to_match_*.mp4 | |
SEEK_POINT=00:00:30 | |
IMG_FORMAT=png | |
FRAME_SIZE=150X100 | |
DEST=thumbnails | |
for f in $FILES |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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: with_example | |
80% (8 of 10) |##################### | Elapsed Time: 0:00:00 ETA: 0:00:00 | |
Running: with_example_stdout_redirection | |
100% (10 of 10) |#########################| Elapsed Time: 0:00:01 Time: 0:00:01 | |
70% (7 of 10) |################## | Elapsed Time: 0:00:00 ETA: 0:00:00 80% (8 of 10) |##################### | Elapsed Time: 0:00:00 ETA: 0:00:00 90% (9 of 10) |######################## | Elapsed Time: 0:00:00 ETA: 0:00:00 | |
100% (10 of 10) |#########################| Elapsed Time: 0:00:01 Time: 0:00:01 | |
Running: basic_widget_example | |
100%|#########################################################################| | |
Test: N/A% |/ | ETA: --:--:-- 0.0 s/BTest: 100% || | Time: 0:00:00 1.9 MiB/s | |
1.7 MiB/s <<<|########################################|>>> 100% Time: 0:00:00 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 xdiff_string_diff(oldData, newData, contextLines) { | |
// discuss at: http://locutus.io/php/xdiff_string_diff | |
// original by: Brett Zamir (http://brett-zamir.me) | |
// based on: Imgen Tata (http://www.myipdf.com/) | |
// bugfixed by: Imgen Tata (http://www.myipdf.com/) | |
// improved by: Brett Zamir (http://brett-zamir.me) | |
// note 1: The minimal argument is not currently supported | |
// example 1: xdiff_string_diff('', 'Hello world!') | |
// returns 1: '@@ -0,0 +1,1 @@\n+Hello world!' | |
// (This code was done by Imgen Tata; I have only reformatted for use in Locutus) |