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 | |
/** | |
* Implements hook_drush_command(). | |
*/ | |
function seed_derivatives_drush_command() { | |
$items = array(); | |
$items['seed_derivatives'] = array( | |
'description' => "Create image derivatives", |
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 | |
function next_blog_post($current_nid) { | |
$view_object = views_get_view("ghg_blog"); | |
$view_object->set_display("default"); | |
$view_object->set_items_per_page(0); | |
$view_object->pre_execute(); | |
$view_object->execute(); | |
$results = $view_object->result; | |
$current_nid = 62; | |
$next_item = FALSE; |
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 | |
db_update('node') // Table name no longer needs {} | |
->fields(array( | |
'comment' => 1, | |
)) | |
->condition('type', 'feature') | |
->execute(); | |
$subquery = db_select('node') | |
->addField('node', 'nid') |
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 | |
gulp = require('gulp'), | |
concat = require('gulp-concat'), | |
wrap = require("gulp-wrap"); | |
gulp.task('scripts', function() { | |
gulp | |
.src([ | |
'./js/modernizr.js', | |
'./js/webflow.js' |
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
$migration = \Drupal::service('plugin.manager.migration')->createInstance($migration_id); | |
$executable = new MigrateExecutable($migration, new MigrateMessage()); | |
$executable->import(). |
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
/** | |
* Implements FORM_ID_submit. | |
*/ | |
function custom_user_auto_ecole_mes_examens_form_submit($form, &$form_state) { | |
if ($form_state['values']['op'] == t('Search')) { | |
$query = array_intersect_key( | |
$form_state['values']['filters'], | |
array_flip( | |
array_filter( | |
array_keys($form_state['values']['filters']), |
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 cli = require('cli'); | |
var options = cli.parse({}, ['gm-tile', 'jimp-tile', 'ocv']); | |
var fs = require('fs'); | |
var path = require('path'); | |
var GIFEncoder = require('gifencoder'); | |
if (cli.command == 'ocv') { | |
var cv = require('opencv'); | |
console.log('opencv - hello!'); |
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
@web.get('/quotes') | |
@IsAuthenticated() | |
public getQuotesAction(request: Request, response: Response) { | |
... | |
} | |
let IsAuthenticated = () => { | |
return (target: Object, key: string | symbol, descriptor: TypedPropertyDescriptor<Handler>) => { | |
let standardHandler: Handler = descriptor.value; |
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
import {Component, ViewChild, OnInit} from '@angular/core'; | |
import {ForexService} from '../../../service/forex'; | |
import {DataSource} from '@angular/cdk/collections'; | |
import {Observable} from 'rxjs/Observable'; | |
import {BehaviorSubject} from 'rxjs/BehaviorSubject'; | |
import 'rxjs/operator/map'; | |
import {MatDialog, PageEvent} from '@angular/material'; | |
import {MatSort} from '@angular/material'; | |
import {IPaginator} from '../../../../core/lib/interface'; | |
import {ConfirmDialogComponent, IConfirmDialogAnswer, IConfirmDialogData} from '../../../../core/dialog/confirm'; |
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
version: "2" | |
services: | |
trading_client_src: | |
image: vlikin/itp-trading_client_src | |
environment: | |
POSTGRES_HOST: db | |
volumes: | |
- trading_client:/usr/src/app:ro |