Skip to content

Instantly share code, notes, and snippets.

@nucklearproject
nucklearproject / ads.dart
Last active Dec 26, 2019
Problema con lag al mostrar ads flutter
View ads.dart
import 'package:firebase_admob/firebase_admob.dart';
import '../services/globals.dart';
class Ads {
InterstitialAd myInterstitial;
MobileAdTargetingInfo targetingInfo = new MobileAdTargetingInfo(
testDevices: TEST_DEVICES,
);
@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 / ads.dart
Last active Nov 23, 2019
Prueba test Flutter positioned into Stack
View ads.dart
import 'package:firebase_admob/firebase_admob.dart';
import '../services/globals.dart';
class Ads {
InterstitialAd myInterstitial;
MobileAdTargetingInfo targetingInfo = new MobileAdTargetingInfo(
testDevices: TEST_DEVICES,
/* keywords: <String>[
"tarot",
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,