Skip to content

Instantly share code, notes, and snippets.

View djadriano's full-sized avatar
:octocat:
Coding...

Adriano Fernandes djadriano

:octocat:
Coding...
View GitHub Profile
{
"data": {
"allContentfulProductPage": {
"edges": [
{
"node": {
"name": "Nikki Lime Leather Sandals",
"node_locale": "en",
"thumbnailImage": {
"file": {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@djadriano
djadriano / detect-landscape-aspect-ratio.scss
Created March 8, 2018 02:10
Media Query for detect landscape mode via aspect ratio
@media all and (min-aspect-ratio: 13/9) and (max-width: $tablet) {
opacity: 0;
pointer-events: none;
}
@djadriano
djadriano / hashes-zip-folder.sh
Created October 26, 2017 20:12
Bash script that read a txt with hash commits from git and generate zip of a folder inside project
# --------------------------------------------------------------------------------------
# How to Use:
# The script needs the following parameters:
# File.txt / folder to save the zips / folder that will be zipped in project
#
# Example:
# $ ./hash.sh file.txt ~/Documents dist/
# --------------------------------------------------------------------------------------
@djadriano
djadriano / organize-files.rb
Last active June 27, 2020 19:06
Script to copy and rename mp3 files
require 'fileutils'
# -------------------------------------------------------------------------------------
# To execute the script use:
# ruby organize-files.rb url_of_folder_to_find_mp3 url_of_folder_to_copy_files
# -------------------------------------------------------------------------------------
dirToFind = "#{ARGV[0]}/**/*.mp3"
dirToFindFlac = "#{ARGV[0]}/**/*.flac"
dirToCopy = ARGV[1]
@djadriano
djadriano / copy-files.rb
Created January 22, 2017 23:07
Script for copy files to another directory
require 'fileutils'
dirToFind = '/Users/adrianofernandes/Desktop/singles/euphoric/**/*.mp3'
Dir[dirToFind].each do |old|
if File.basename(old).include?('(radio')
puts '-----------------------------------------'
puts 'have a radio version'
puts old
puts '-----------------------------------------'
@djadriano
djadriano / rename-files.rb
Created January 22, 2017 23:06
Script for rename mp3 files and organize names
def adjust_file_name(str)
newEntry = str.downcase.gsub(/\w+/, &:capitalize)
newEntry = newEntry.gsub('.Mp3', '.mp3')
return newEntry
end
dirToFind = '/Users/adrianofernandes/Music/hardstyle/organized/renamed/euphoric/*'
arrItemsToFind = [
'(Full)',
@djadriano
djadriano / cloudSettings
Last active January 11, 2017 23:33
Visual Studio Code Sync Settings GIST
{"lastUpload":"2017-01-11T23:33:39.862Z"}
@djadriano
djadriano / form.js
Last active May 11, 2017 14:11
Form In React
import React from 'react';
import { connect } from "react-redux"
import store from "../store"
import { submitForm } from '../actions/additional-data-actions'
import { setGrayScreenMode } from '../actions/core-actions'
import BasicPage from '../helpers/basic-page';
import { Link } from 'react-router'
@djadriano
djadriano / bem.scss
Last active June 16, 2016 21:30
Sass mixins to generate classes in SUITCSS naming conventions
// -----------------------------------------------------------------------------------------------------------------
// Mixins to use the SUITCSS methodology.
// This Sass version allow to use the nested classes and selectors. Solved the problem from PostCss Bem Plugin
//
// See more about:
// https://suitcss.github.io/
//
// The mixins generate classes in SUITCSS naming conventions based on PostCss Bem Plugin, see more about:
// https://github.com/ileri/postcss-bem
// -----------------------------------------------------------------------------------------------------------------