Skip to content

Instantly share code, notes, and snippets.

View jimmyadaro's full-sized avatar
💬
So much going on right now!

Jimmy Adaro jimmyadaro

💬
So much going on right now!
  • Buenos Aires, Argentina
  • 05:44 (UTC -03:00)
View GitHub Profile
@jimmyadaro
jimmyadaro / packages.cson
Created April 8, 2019 15:13
Atom packages list from "package-sync"
packages: [
"atom-bracket-highlight"
"auto-update-packages"
"busy-signal"
"color-picker"
"emmet"
"file-icons"
"file-templates"
"highlight-line"
"highlight-selected"
@jimmyadaro
jimmyadaro / keymap.cson
Created April 8, 2019 17:17
Atom keymap
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@jimmyadaro
jimmyadaro / key_as_var.php
Created May 1, 2019 15:25
Use an array key as a new variable
<?php
$my_array = array(
"foo" => "bar",
"quick" => "fox"
);
foreach($my_array as $k => $v) {
${$k} = $v;
}
@jimmyadaro
jimmyadaro / deploy.php
Created June 6, 2019 21:51
Deployer config base
<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'App Name');
// Project repository
set('repository', 'git@git-provider.com:repo-name/project-name.git');
@jimmyadaro
jimmyadaro / Jimmy.terminal
Last active June 10, 2019 19:35
macOS Terminal Config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKyxYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMZHSQoVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NHMCAwIDAgMUYwIDAg
MAAQAYACgAbTFBUNFhcYVE5TSURVTlNJQ0MQB4ADgAXSGg0bHFdOUy5kYXRhTxEMSAAA
@jimmyadaro
jimmyadaro / bash-concat-example.sh
Created September 16, 2019 21:27
Concat function return with string for "read -p"
# DESCRIPTION: Simple example of "read -p" and it's usage when trying to print a simple concat from a function and a user input
# Here we'll assume "$folder" comes from a previously-checked "getopts options" loop
# (given as an argument for our script/command option, like "ourscript -f MyFolderName")
##################################################################
##################################################################
##################################################################
# Print a styled "important:" text
@jimmyadaro
jimmyadaro / .bash_profile
Last active October 15, 2019 20:54
Simple config for macOS' .bash_profile (or .zshrc)
# Repeat this line as much as needed so you can access to project's SSH console asap using just the project name
alias <PROJECT_NAME>='ssh -i /Users/<USER_NAME>/.ssh/<KEY_NAME> <USER>@<HOST>'
# Remove everything from Docker system
alias dockerpurge='docker system prune --all --force --volumes'
# Man I hate DS_Store files so much...
alias rds='find . -name '.DS_Store' -type f -delete && echo ".DS_Store files removed!"'
# Open a new terminal window on the same location as the current one is
@jimmyadaro
jimmyadaro / snippets.cson
Last active May 22, 2020 22:51
Atom snippets
'.text.html, .source':
'Master Container':
'prefix': 'mc'
'body': '<div class="master-container">\n\t<div class="master-container-padding">\n\t\t$1\n\t</div>\n</div>'
'Master Container With Row':
'prefix': 'mcr'
'body': '<div class="master-container">\n\t<div class="master-container-padding">\n\t\t<div class="row">\n\t\t\t$1\n\t\t</div>\n\t</div>\n</div>'
'SVG Image With PNG Fallback':
'prefix': 'img2'
@jimmyadaro
jimmyadaro / .zshrc
Created June 7, 2020 22:40
OhMyZSH config file
# Remove everything from Docker system
alias dockerpurge='docker system prune --all --force --volumes'
# Man I hate DS_Store files so much...
alias rds='find . -name '.DS_Store' -type f -delete && echo ".DS_Store files removed!"'
# Open the hosts file with Atom (really useful for VirtualHosts)
alias hosts='atom /private/etc/hosts'
# Go to htdocs
@jimmyadaro
jimmyadaro / gulpfile.js
Last active June 27, 2020 11:51
Gulp with local HTTPS
// If you're using XAMPP on macOS, you can use "Secure-Vhost"
// @link: https://github.com/jimmyadaro/secure-vhost
var local_dev_url = "my-site.local",
path_to_local_dev_key = "/path/to/Secure-Vhost/"+local_dev_url+"/cert.key",
path_to_local_dev_cert = "/path/to/Secure-Vhost/"+local_dev_url+"/cert.crt";
// ...
browserSync.init({