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 x_child_visual_composer_update_existing_shortcodes(){ | |
if ( function_exists( 'vc_add_param' ) ) { | |
vc_add_param( 'vc_row', array( | |
'type' => 'textfield', | |
'heading' => "HTML ID", | |
'param_name' => 'element_id', | |
'value' => '', | |
'description' => __( "Assign an ID to the row", "discprofile" ), | |
) ); |
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
// | |
// Disjunction - aka Scalaz Either | |
// \/[A, B] is an alternative to Either[A, B] | |
// -\/ is Left (usually represents failure by convention) | |
// \/- is Right (usually represents success by convention) | |
// Left or Right - which side of the Disjunction does the "-" appear? | |
// | |
// Prefer infix notation to express Disjunction Type v: String \/ Double | |
// | |
// References |
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 express from "express"; | |
/** | |
* Takes a route handling function and returns a function | |
* that wraps it after first checking that the strings in | |
* `reserved` are not part of `req.body`. Used for ensuring | |
* create and update requests do not overwrite server-generated | |
* values. | |
*/ | |
function checkReservedParams(routeHandler, ...reserved) { |
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
Namespace ProjectWithSwagger | |
{ | |
public class Startup | |
{ | |
// This method gets called by the runtime. Use this method to add services to the container | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
//.... | |
services.ConfigureSwaggerGen(swaggerGen => | |
{ |
Proposed levels of skill for the scala programming language, can be used as a base for a curriculum
Related links:
- the scala style guide.
- a scala basic exam
- examples of scala abuses
- sample training curriculum Artima
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'), | |
plumber = require('gulp-plumber'), | |
server = require('tiny-lr')(), | |
refresh = require('gulp-livereload'), | |
mocha = require('gulp-mocha'), | |
stylus = require('gulp-stylus'), | |
notify = require('gulp-notify'), | |
nodemon = require('gulp-nodemon'), | |
jshint = require('gulp-jshint'), |
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
// | |
// Google Cloud Pub/Sub C# example | |
// NOTE: This is a .NET Core 1.1 console app. | |
// Use "dotnet run" to run it, run setup.ps1 first. | |
// | |
using System; | |
using System.Collections.Generic; | |
using Google.Cloud.PubSub.V1; | |
using Google.Protobuf; |
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
package core.dao | |
import scala.concurrent.Future | |
import play.api.Logger | |
import reactivemongo.core.commands.LastError | |
import reactivemongo.core.errors.DatabaseException | |
import core.db.MongoHelper |
- Don't run as root.
- For sessions, set
httpOnly
(andsecure
totrue
if running over SSL) when setting cookies. - Use the Helmet for secure headers: https://github.com/evilpacket/helmet
- Enable
csrf
for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrf - Don't use the deprecated
bodyParser()
and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use thedefer
property andpipe()
the multipart upload stream to the intended destination.
OlderNewer