wget https://gist.githubusercontent.com/senorihl/637430191235b5362a27a8c785f9623c/raw/03c206bb0c8cecaff50325dfd170d913d1d97f6e/clean-staging-branch.sh -O $HOME/.clean-staging-branch.sh
chmod a+x $HOME/.clean-staging-branch.sh
git config --global alias.clean-staging '!bash $HOME/.clean-staging-branch.sh'
In order to add custom attributes to an HTML element that is generated by GrapesJS, one can simply make use of traits. For example, if you wish to produce an HTML element which contains the tag data-noout
, a trait with the name data-noout
can be added to a custom component.
var domComps = editor.DomComponents;
var dType = domComps.getType('default');
var dModel = dType.model;
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
# Pencil Project Shortcuts | |
## General Shortcuts | |
+ New Document: Ctrl + n | |
+ Open: Ctrl + o | |
+ Save: Ctrl + s | |
+ Save as: Ctrl + Shift + s | |
+ Export: Ctrl + Shift + e | |
+ Print: Ctrl + p |
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
#CACHE{0} | |
[(#HTTP_HEADER{Content-type: text/xml[; charset=(#CHARSET)]})]<?xml | |
version="1.0"[ encoding="(#CHARSET)"]?> | |
<rss version="2.0" [(#REM) rss 2.0.9)] | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
> | |
[(#SET{channel,#ENV{url}|analyser_site})] | |
<channel[ xml:lang="(#LANG)"]> | |
[<title>(#GET{channel}|table_valeur{nom_site}|textebrut|texte_backend)</title>] |
Inspired by a Gist from kevinelliott - thanks!
- Xcode - for command line tools required by Homebrew
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
We'll use ~/Dropbox/Macnotes
in this example
We'll use Finder for this instead of terminal as the cp -r
command also copies the contents of all aliases and the Notes folder has a lot of those.
Quit notes
Open terminal and enable hidden files in Finder:
defaults write com.apple.finder AppleShowAllFiles YES.
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
/** | |
* Make sure Graphicsmagick is installed on your system | |
* osx: brew install graphicsmagick | |
* ubuntu: apt-get install graphicsmagick | |
* | |
* Install these gulp plugins | |
* glup, gulp-image-resize, gulp-imagemin and imagemin-pngquant | |
* | |
* Group images according to their output dimensions. | |
* (ex: place all portfolio images into "images/portfolio" |
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
// Photoshop Script to Create iPhone Icons from iTunesArtwork | |
// Original: https://gist.github.com/appsbynight/3681050 | |
// Turn debugger on. 0 is off. | |
// $.level = 1; | |
try | |
{ | |
// Prompt user to select iTunesArtwork file. Clicking "Cancel" returns null. | |
var iTunesArtwork = File.openDialog("Select a sqaure PNG file that is at least 1024x1024.", "*.png", false); |
NewerOlder