Skip to content

Instantly share code, notes, and snippets.

View frankyonnetti's full-sized avatar

Frank Yonnetti frankyonnetti

View GitHub Profile
@frankyonnetti
frankyonnetti / wordpress-if-blocks.php
Last active February 17, 2021 00:26
WordPress - if blocks #wordpress #if #blocks #acf
<?php // has_block
if (has_block('acf/call-to-action-image')) {
$acf_block = "acf-blocks image-cta";
} else {
$acf_block = "acf-blocks";
}
?>
@frankyonnetti
frankyonnetti / vue-computed-and-v-for.js
Last active February 17, 2021 00:27
Vue - computed and v-for #vue #v-for
<ul>
<li v-for="item in itemsLessThanTen" :key="item.name">
{{ item.name }} - {{ item.price }}
</li>
</ul>
<script>
export default {
data () {
@frankyonnetti
frankyonnetti / vue-create.md
Last active February 17, 2021 00:28
Vue create #vue

vue start

$ vue create my-project OR $ vue ui

@frankyonnetti
frankyonnetti / terminal-comments.sh
Last active February 17, 2021 00:29
Terminal - comments #terminal #commands
http://www.westwind.com/reference/OS-X/commandline/files-folders.html
### drupal files and folders ###
################################
# apply permissions
# cd to directory
# -Recursive (all sub files/dir) user:group
$ sudo chown -R 506:main live-docs
@frankyonnetti
frankyonnetti / svg-loaders.html
Last active April 29, 2022 01:11
SVG - loaders #svg #loaders
https://codepen.io/nikhil8krishnan/pen/rVoXJa
<!-- Loader1 -->
<svg version="1.1" id="L1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
<circle fill="none" stroke="#fff" stroke-width="6" stroke-miterlimit="15" stroke-dasharray="14.2472,14.2472" cx="50" cy="50" r="47" >
<animateTransform
attributeName="transform"
attributeType="XML"
@frankyonnetti
frankyonnetti / colors-social-media.txt
Last active February 17, 2021 00:30
Colors - Social Media #colors #social-media
Django: #a1c42c / #35363c
Dribbble: #ea4c89
Drupal: #0678be
Facebook: #4e69ac
github #24292e
LinkedIn: #0077b5
Pinterest: #c5392e
Twitter: #38a1f3
WordPress: #23282d
YouTube: #ff0000
@frankyonnetti
frankyonnetti / sass-flexgrid-framework.md
Last active May 22, 2021 19:53
Scss - flexgrid framework #scss #sass-flexbox #framework

Media Queries

Grid media query variables: variables/_grid-variables.scss

@media #{$breakpoint-xs-only} { }  // max-width: 480px
@frankyonnetti
frankyonnetti / rsync.sh
Last active February 17, 2021 00:30
rsync #rsync
# rsync basic
rsync -a /tmp/foo/* /tmp/bar
# NOTE: the difference between including a forward slash (/) at the end of the source path, and omitting it.
foo/ # will transfer all files INSIDE the specified directory
foo # will transfer the directory itself with all files inside
# rsync file count
rsyn -avz file/path/ file/path/ | wc -l
@frankyonnetti
frankyonnetti / ruby-rbenv-environments.sh
Last active February 17, 2021 00:31
Ruby - rbenv environments #ruby
# https://gorails.com/setup/osx/10.12-sierra
# https://github.com/rbenv/rbenv
# list all available versions:
$ rbenv install -l
# install a Ruby version:
$ rbenv install 2.1.0
# ensure that the target version for your project
@frankyonnetti
frankyonnetti / python.md
Last active February 17, 2021 00:31
Python #python

Installed with Homebrew

dependencies for python: readline, sqlite, gdbm

Pip and setuptools have been installed. To update them

$ pip install --upgrade pip setuptools

You can install Python packages with

$ pip install <package>

make sure PATH is: