Useful in Electron apps when the default title bar must be hidden. There are some slight issues with this rendering in browser, but it looks perfect inside Electron :)
Discover gists
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
{ | |
"0":{ | |
"day":{ | |
"description":"Sunny", | |
"image":"http://openweathermap.org/img/wn/01d@2x.png" | |
}, | |
"night":{ | |
"description":"Clear", | |
"image":"http://openweathermap.org/img/wn/01n@2x.png" | |
} |
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
/** | |
* Stop an iframe or HTML5 <video> from playing | |
* @param {Element} element The element that contains the video | |
*/ | |
var stopVideo = function ( element ) { | |
var iframe = element.querySelector( 'iframe'); | |
var video = element.querySelector( 'video' ); | |
if ( iframe ) { | |
var iframeSrc = iframe.src; | |
iframe.src = iframeSrc; |
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
import SwiftUI | |
struct PhotoView: View { | |
@State var scale: CGFloat = 1 | |
@State var scaleAnchor: UnitPoint = .center | |
@State var lastScale: CGFloat = 1 | |
@State var offset: CGSize = .zero | |
@State var lastOffset: CGSize = .zero | |
@State var debug = "" |
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
YouTube video link: https://youtu.be/8Uofkq718n8 | |
All the commands that are executed in the above youtube video are mentioned in this gist. | |
1. Install Apache server on Ubuntu | |
sudo apt install apache2 | |
2. Install php runtime and php mysql connector | |
sudo apt install php libapache2-mod-php php-mysql | |
3. Install MySQL server |
Render 1 | Render 2 | State Preserved? |
---|---|---|
<>...</> |
<>{[...]}</> |
yes (in any level) |
<><>...</></> |
<>...</> |
no |
[...] |
[[...]] |
no |
[<>...</>] * |
[...] |
no |
[<>...</>] * |
<>...</> |
no |
[<>...</>] * |
<>[...]</> |
no |
[<>...</>] * |
[[...]] |
yes |
[<>...>] * |
<><>...>> |
yes |
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config
file in a .ssh
directory. The config
file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh
directory by default. You can navigate to it by running cd ~/.ssh
within your terminal, open the config
file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes
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
// Replace SmartObject’s Content and Save as JPG | |
// 2017, use it at your own risk | |
// Via @Circle B: https://graphicdesign.stackexchange.com/questions/92796/replacing-a-smart-object-in-bulk-with-photoshops-variable-data-or-scripts/93359 | |
// JPG code from here: https://forums.adobe.com/thread/737789 | |
#target photoshop | |
if (app.documents.length > 0) { | |
var myDocument = app.activeDocument; | |
var theName = myDocument.name.match(/(.*)\.[^\.]+$/)[1]; | |
var thePath = myDocument.path; |
NewerOlder