Skip to content

Instantly share code, notes, and snippets.

View tic984's full-sized avatar

Sinisa Valentic tic984

View GitHub Profile
@tic984
tic984 / Blocks.md
Created December 18, 2020 22:01 — forked from bdlangton/Blocks.md
Drupal 8 programmatic solutions

Render custom blocks

$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);

Render plugin blocks

$block_manager = \Drupal::service('plugin.manager.block');
Uncaught PHP Exception Elastica\Exception\ResponseException: "failed to create query: { "multi_match" : { "query" : "\nmodupe ajibola\nproduct sw development manager at vision invent inc.\n\nround rock tx \nmodupeajibolagce@ \n\nto help a reputable organization or a startup company expedite software and product development initiatives\nwhile utilizing my programming skills system architecture design and management experiences.\nwilling to relocate to texas city tx\nauthorized to work in the us for any employer\n\nwork experience\n\nsoftware development manager\nboonchapman austin tx present\n\n own and drive development of key software web and mobile application platforms.\n manage team of developers to design and implement new functionality as well as improving existing\nproducts. team includes business analyst database front end support analyst and quality assurance\nteams.\n drive brainstorming and discovery exercises to determine new ideas.\n lead software development following agile methodology.\n provi
[2017-09-11 16:25:43] php.INFO: The "security.context" service is deprecated since Symfony 2.6 and will be removed in 3.0. {"type":16384,"file":"/DATA/OWP-v2/releases/20170908195822/app/cache/dev/appDevDebugProjectContainer.php","line":6982,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"/DATA/OWP-v2/releases/20170908195822/app/cache/dev/appDevDebugProjectContainer.php","line":6982,"function":"trigger_error"},{"file":"/DATA/OWP-v2/releases/20170908195822/app/bootstrap.php.cache","line":2222,"function":"getSecurity_ContextService","class":"appDevDebugProjectContainer","type":"->"},{"file":"/DATA/OWP-v2/releases/20170908195822/src/OWP/Bundle/AdminBundle/Controller/BaseAdminController.php","line":1428,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"->"},{"file":"/DATA/OWP-v2/releases/20170908195822/src/OWP/Bundle/AdminBundle/Controller/BaseAdminController.php","line":520,"function":"getUser","class":"OW
@tic984
tic984 / README.md
Created January 12, 2017 22:29 — forked from StefanWallin/README.md
nginx ssl config with multiple SNI vhosts and A+ SSL Labs score as of 2014-11-05

Configuring nginx for SSL SNI vhosts

Gotchas

Remarks

  • My version of konklones SSL config does not have SPDY support(my nginx+openssl does not support it)
  • You need a default ssl server (example.org-default.conf).
  • Some SSL-options have to be unique across your instance, so it's easier to have them in a common file(ssl.conf).
[2016-12-23 15:37:09] request.CRITICAL: Uncaught PHP Exception Assetic\Exception\FilterException: "An error occurred while running: '/usr/bin/nodejs' '/usr/bin/uglifycss' '/DATA2/tmp/assetic_uglifycss3M3bsT' Error Output: module.js:340 throw err; ^ Error: Cannot find module '/usr/bin/uglifycss' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3 Input: /*! * Bootstrap v3.3.6 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ html { font-family: sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block
Author of this mobile application is Hexis j.d.o.o..
All of the data used in this mobile application is property of United Nations High Commissioner for Refugees, and is publicly available on popstats.unhcr.org.
Hexis j.d.o.o. is not responsible for authenticity and veracity of the data.
For all information and inquiries related to population statistics please visit popstats.unhrcr.org.
Developed by Hexis j.d.o.o., for more details please visit www.hexis.hr.
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /vagrant/;
index index.php;
server_name localhost;
if ( $http_user_agent ~* (nmap|nikto|wikto|sf|sqlmap|bsqlbf|w3af|acunetix|havij|appscan) ) {
return 403;
}
@tic984
tic984 / date.sql
Created October 25, 2015 11:36 — forked from johngrimes/date.sql
MySQL Date Dimension Build Script
/* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */
###### small-numbers table
DROP TABLE IF EXISTS numbers_small;
CREATE TABLE numbers_small (number INT);
INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
###### main numbers table
DROP TABLE IF EXISTS numbers;
CREATE TABLE numbers (number BIGINT);
DELIMITER $$
CREATE PROCEDURE myproc()
BEGIN
DECLARE i int DEFAULT 1993;
WHILE i <= 2014 DO
INSERT INTO year (year) VALUES (i);
SET i = i + 1;
END WHILE;
/* whole procedure ends with the custom delimiter */
END$$
[Thu Feb 26 13:00:02.537044 2015] [core:notice] [pid 59180] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 26 14:00:01.359059 2015] [mpm_prefork:notice] [pid 59180] AH00171: Graceful restart requested, doing restart
[Thu Feb 26 14:00:01.518853 2015] [mpm_prefork:notice] [pid 59180] AH00163: Apache/2.4.10 (Ubuntu) PHP/5.5.21-1+deb.sury.org~precise+2 configured -- resuming normal operations
[Thu Feb 26 14:00:01.518887 2015] [core:notice] [pid 59180] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 26 15:00:01.839912 2015] [mpm_prefork:notice] [pid 59180] AH00171: Graceful restart requested, doing restart
[Thu Feb 26 15:00:01.997189 2015] [mpm_prefork:notice] [pid 59180] AH00163: Apache/2.4.10 (Ubuntu) PHP/5.5.21-1+deb.sury.org~precise+2 configured -- resuming normal operations
[Thu Feb 26 15:00:01.997221 2015] [core:notice] [pid 59180] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 26 16:00:01.399672 2015] [mpm_prefork:notice] [pid 59180] AH00171: Graceful restart requested, doing restart
[Thu Feb