This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Spatie\MediaLibrary\Models\Media; | |
class MigrateFiles extends Command | |
{ | |
protected $signature = 'migrate-files'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Scene = require('Scene'); | |
const Persistence = require('Persistence'); | |
const Diagnostics = require('Diagnostics'); | |
const Patches = require('Patches'); | |
// Esperamos por todos os itens que iremos usar do SparkAR ficarem disponíveis | |
Promise.all([ | |
Patches.outputs.getPulse('wasTapped'), | |
Scene.root.findFirst('2dText0'), | |
]).then(results => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
div { | |
float: left; | |
width: 12.5%; | |
padding: 40px 0; | |
line-height: 30px; | |
text-align: center; | |
color: #fff; | |
font-family: Verdana; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp = require 'gulp' | |
$ = require('gulp-load-plugins')({ | |
pattern: ['gulp-*', 'run-sequence'] | |
}); | |
sources = | |
sass: 'docroot/sites/all/themes/nylottery/assets/scss/**/*.scss' | |
destinations = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Secure password hashing functions for user authentication. | |
* | |
* Based on the Portable PHP password hashing framework. | |
* @see http://www.openwall.com/phpass/ | |
* | |
* An alternative or custom version of this password hashing API may be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$schema['votingapi_vote'] = array( | |
'fields' => array( | |
'vote_id' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), | |
'entity_type' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'node'), | |
'entity_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), | |
'value' => array('type' => 'float', 'not null' => TRUE, 'default' => 0), | |
'value_type' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'percent'), | |
'tag' => array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => 'vote'), | |
'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), | |
'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { | |
$fields['id'] = BaseFieldDefinition::create('integer') | |
->setLabel(t('ID')) | |
->setDescription(t('The ID of the Voting API Vote entity.')) | |
->setReadOnly(TRUE); | |
$fields['uuid'] = BaseFieldDefinition::create('uuid') | |
->setLabel(t('UUID')) | |
->setDescription(t('The UUID of the Voting API Vote entity.')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Q = require('q'), | |
os = require('os'), | |
path = require('path'), | |
_ = require('underscore'), | |
data_path = require('nw.gui').App.dataPath; | |
/** Default settings **/ | |
var Settings = {}; | |
// User interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function HOOK_ranking() { | |
$rankings = array(); | |
$types = node_type_get_types(); | |
foreach ($types as $type) { | |
$rankings[$type->type . '_node_type_boost_search'] = array( | |
'title' => t('Boost "' . $type->name . '" nodes'), | |
'arguments' => array(':type' => $type->type), | |
'score' => ' FIND_IN_SET(n.type, :type)', | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush = require 'drush-node' | |
destinations = | |
js: 'assets/js' | |
gulp.task 'drupal-minifyjs', -> | |
drush.init() | |
.then () -> | |
drush.exec('php-eval "print realpath(\'.\')"') | |
.then (realpath) -> |
NewerOlder