Skip to content

Instantly share code, notes, and snippets.

View kaweski's full-sized avatar
👩‍💻
Focusing

Natasha Kaweski kaweski

👩‍💻
Focusing
View GitHub Profile
@kaweski
kaweski / validPhone.js
Created August 28, 2018 17:48
Valida telefones do Brasil com DDD, o 9º dígito e obrigatoriamente contendo 9 dígitos, mais espaços e caracteres de separação.
let regex = /^\([1-9]{2}\) 9 [7-9][0-9]{3}\-[0-9]{4}$/;
if( regex.test(c.value) ) {
return null;
} else {
return { phoneError: true };
}
@kaweski
kaweski / SCSS.md
Created November 8, 2017 17:55 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@kaweski
kaweski / erro.txt
Created July 20, 2017 14:24
Erro de build. $ sudo npm run build:aot:prod
$ sudo npm run build:aot:prod
Password:
> HUB@6.0.0 build:aot:prod /Users/natasha.kaweski/Documents/new/hub
> npm run clean:dist && npm run clean:aot && BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail
> HUB@6.0.0 clean:dist /Users/natasha.kaweski/Documents/new/hub
> npm run rimraf -- dist
@kaweski
kaweski / package.json
Created January 9, 2017 15:29
Package JSON
{
"name": "html-skeleton-gulp",
"version": "0.0.1",
"description": "A base to start your front-end project using Gulpjs",
"homepage": "http://samweb.com.br",
"repository": {
"type": "git",
"url": "http://github.com/samwx/html-skeleton-gulp"
},
"engines": {
// Load gulp plugins with 'require' function of nodejs
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
gutil = require('gulp-util'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
minifyCSS = require('gulp-minify-css'),
less = require('gulp-less'),
path = require('path');
@kaweski
kaweski / plugin.php
Created November 30, 2016 15:46
Slide Personalizado::Plugin
<?php
$args = array(
'post_id' => 2,
'query_results' => $posts_data,
// 'component' => 'component-clients-01',
'component' => get_template_directory() . '/component-clients-01.php',
'external_component' => true,
'show_link_buttom' => 'Ver mais',
'slick_slider_to_show' => 3,
'slick_slider_to_scroll' => 1,
@kaweski
kaweski / single.php
Created November 21, 2016 12:58
Botões de compartilhamento
<?php
/**
* Botões de Compartilhamento
*/
$share_url = get_permalink();
$share_title = get_the_title();
$post_id = get_the_id();
$thumb_id = get_post_thumbnail_id( $post_id );
$thumb_url = wp_get_attachment_image_src( $thumb_id, 'thumbnail', true );
@kaweski
kaweski / botao.php
Created November 17, 2016 18:13
Tabela de Medidas usando fancybox.
<?php
/**
*
* Tabela de Medidas
*
*/
$images = foundation_q_get_option('website_table_sizes');
$images = explode(",", $images); // Transforma a lista de IDs em um array
foreach( $images as $image )
@kaweski
kaweski / form.php
Created November 17, 2016 17:35
Lista as subcategorias de uma categoria num select.
<form action="#" class="form-field" id="ID_DO_SELECT">
<?php
$taxonomia = 'ID_DA_SUA_TAXONOMIA';
$args = array(
'orderby' => 'name',
'parent' => 0,
'taxonomy' => $taxonomia,
'hide_empty' => 0,
);
@kaweski
kaweski / Banco.java
Last active January 11, 2017 19:38
RETURN_GENERATED_KEYS
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class Main {
private static final String URL = "jdbc:mysql://localhost/testdb";
private static final String USERNAME = "root";