- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert)
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
| # usage : sh download.sh 100 | |
| # will download 100 pics | |
| START=1 | |
| for i in $(eval echo "{$START..$1}") | |
| do | |
| curl "http://lorempixel.com/index.php?generator=1&x=640&y=480&cat=" -o temp.html && cat temp.html | sed -n 's/.*<img src="\([^" ]*\)".*/\1/p' | awk '{print "http://lorempixel.com/"$1}' | xargs curl -o $i.jpg | |
| done |
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
| (* | |
| Put this script in: | |
| /Users/USERNAME/Library/Scripts/ | |
| Download and install FastScripts to assign this script to a keyboard shortcut: | |
| http://www.red-sweater.com/fastscripts/ | |
| Source: http://apple.stackexchange.com/a/49546/123845 |
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 | |
| # ⚠️ This project has moved | |
| # https://github.com/m1st0/php_ubuntu_build_script | |
| # This gist is no longer maintained | |
| echo "This project moved to: https://github.com/m1st0/php_ubuntu_build_script" | |
| exit 1 | |
| # PHP 8 Compile # |
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
| var _ = require('lodash'); | |
| var arr = [ | |
| {"name":"my2child1","title":"My 2 Child 1","parent":"my2"}, | |
| {"name":"my2child2","title":"My 2 Child 2","parent":"my2"}, | |
| {"name":"parent","title":"A single parent"}, | |
| {"name":"child-parent","title":"A child parent","parent":"child1"}, | |
| {"name":"my","title":"My"}, | |
| {"name":"my2","title":"My2"}, | |
| {"name":"child1","title":"Child 1","parent":"my"}, |
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
| // Approach 1: Use React.createClass | |
| var HelloWorld = React.createClass({ | |
| getInitialState() { | |
| return { message: 'Hi' }; | |
| }, | |
| logMessage() { | |
| // this magically works because React.createClass autobinds. | |
| console.log(this.state.message); | |
| }, |
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
| /* | |
| ArrayUtil exposes a set of helper methods for working with | |
| ReadableArray (by React Native), Object[], and JSONArray. | |
| MIT License | |
| Copyright (c) 2020 Marc Mendiola | |
| Permission is hereby granted, free of charge, to any person obtaining a copy |
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() { | |
| var errorBoxElement = false; | |
| var showError = function(error) { | |
| if (!errorBoxElement) { | |
| errorBoxElement = document.createElement('div'); | |
| errorBoxElement.style.position = 'absolute'; | |
| errorBoxElement.style.top = '0'; | |
| errorBoxElement.style.bottom = '0'; | |
| errorBoxElement.style.left = '0'; | |
| errorBoxElement.style.right = '0'; |
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
| --- | |
| format_version: 1.1.0 | |
| default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
| trigger_map: | |
| - push_branch: "*" | |
| workflow: tests | |
| workflows: | |
| _tests_setup: | |
| steps: | |
| - activate-ssh-key: {} |
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
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.5.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| /* | |
| // ########################################################################## */ | |
| // New cheat sheet for Bootstrap 5: |