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,
);
View gist:3895429
:regex
jQuery.expr[':'].regex = function(elem, index, match) {
var matchParams = match[3].split(','),
validLabels = /^(data|css):/,
attr = {
method: matchParams[0].match(validLabels) ?
matchParams[0].split(':')[0] : 'attr',
property: matchParams.shift().replace(validLabels,'')
},
regexFlags = 'ig',
@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",
@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 / react-native link
Last active Aug 13, 2018
rnpm-install ERR! Something went wrong while linking.
View react-native link
@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(
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 / 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;
}
@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';