Skip to content

Instantly share code, notes, and snippets.

nucklearproject

Block or report user

Report or block nucklearproject

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nucklearproject
nucklearproject / react-native link
Last active Aug 13, 2018
rnpm-install ERR! Something went wrong while linking.
View react-native link
@nucklearproject
nucklearproject / reset react native cache
Last active Aug 28, 2018
How to reset all cache from React native in Windows
View reset react native cache
Work in windows with Cygwin or Git bash.
Util when update node packages or pacth any files in node packages. The changes is not available instantly on your environment :/
In your proyect root:
rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/haste-*
@nucklearproject
nucklearproject / test.dart
Created Aug 10, 2018
Create a Stack->ListView->Positioned
View test.dart
body: new Stack(
children: <Widget>[
new Container(
decoration: _recursos.backgroundImageComun(),
),
new Column(
children: <Widget>[
new Container(
height: 196.0,
child: new Stack(
@nucklearproject
nucklearproject / pruebas.dart
Created Aug 9, 2018
Prueba test Flutter positioned into Stack
View pruebas.dart
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE file.
// Demonstrates a basic shared element (Hero) animation.
import 'package:flutter/material.dart';
import '../comunes/recursos.dart' as _recursos;
View rows.dart
Container seleccionBlock(double rotacion, double margin, int contador) {
return Container(
margin: EdgeInsets.only(top: margin),
child: Transform.rotate(
angle: rotacion,
child: Container(
width: 110.0,
height: 196.0,
// padding: const EdgeInsets.all(4.0),
@nucklearproject
nucklearproject / WP-no-category.php
Created Sep 19, 2016
Worepress - No listar en los posts los posts que no tengan una categoria definida.
View WP-no-category.php
//if the post is category "uncategorized" or child of "uncategorized" as the main category, change the permalink rule of "/%category%/%postname%" to "/%postname%"
function my_pre_post_link($permalink, $post, $leavename)
{
if ($post->post_type != 'post') {
return $permalink;
}
$cats = get_the_category($post->ID);
if (!count($cats)) {
return $permalink;
}
View admin-genesis-functions.php
<?php
function be_megasense_defaults($defaults)
{
$defaults['ad_post_align'] = 'left';
$defaults['disquss-name'] = '';
$defaults['facebook-appid'] = '';
$defaults['default-comment'] = 'default';
$default['show_author'] = '1';
@nucklearproject
nucklearproject / gist:c4f845963bbeee624056
Last active Aug 29, 2015
Reemplazar la url de una pagina por la categoria para SILO
View gist:c4f845963bbeee624056
function wpa_alter_cat_links( $termlink, $term, $taxonomy ){
if( 'category' == $taxonomy && 0 == $term->parent ){
return str_replace( '/category', '', $termlink );
}
return $termlink;
}
add_filter( 'term_link', 'wpa_alter_cat_links', 10, 3 );
@nucklearproject
nucklearproject / gist:5406964
Created Apr 17, 2013
Javascript with detect
View gist:5406964
// Manages changes in responsive layout
var layout = (function() {
var callbacks = [];
// Container for checking changes in layout width
var $container = $('#header .container');
// Container width: screen width
var steps = {
960: 960,
@nucklearproject
nucklearproject / gist:5245967
Last active Mar 15, 2017
Drupal simple query's
View gist:5245967
REcopilacion de consultas SQL para drupal.
<?php
// Retorna un simple valor, retorna el nomnbre de la taxonomia
function termName($tid){
$name = db_query("select name from {taxonomy_term_data} where tid=:tid",
array(':tid' => $tid))->fetchField();
return $name;
}
You can’t perform that action at this time.