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
/*! | |
* jQuery lightweight plugin boilerplate | |
* Original author: @ajpiano | |
* Further changes, comments: @addyosmani | |
* Licensed under the MIT license | |
*/ | |
// the semi-colon before the function invocation is a safety | |
// net against concatenated scripts and/or other plugins |
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 | |
/** | |
* Returns true if a database table column exists. Otherwise returns false. | |
* | |
* @link http://stackoverflow.com/a/5943905/2489248 | |
* @global wpdb $wpdb | |
* | |
* @param string $table_name Name of table we will check for column existence. | |
* @param string $column_name Name of column we are checking for. |
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
/* jshint strict: false */ | |
/* globals require, console */ | |
var gulp = require('gulp'); | |
var exit = require('gulp-exit'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babelify = require('babelify'); | |
var source = require('vinyl-source-stream'); |
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
#!/bin/bash | |
# | |
# https://github.com/Nyr/openvpn-install | |
# | |
# Copyright (c) 2013 Nyr. Released under the MIT License. | |
# Detect Debian users running the script with "sh" instead of bash | |
if readlink /proc/$$/exe | grep -q "dash"; then | |
echo "This script needs to be run with bash, not sh" |
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
SET FOREIGN_KEY_CHECKS = 0; | |
SET GROUP_CONCAT_MAX_LEN=32768; | |
SET @tables = NULL; | |
SELECT GROUP_CONCAT('`', table_name, '`') INTO @tables | |
FROM information_schema.tables | |
WHERE table_schema = (SELECT DATABASE()); | |
SELECT IFNULL(@tables,'dummy') INTO @tables; | |
SET @tables = CONCAT('DROP TABLE IF EXISTS ', @tables); | |
PREPARE stmt FROM @tables; |
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 com.codahale.metrics.MetricRegistry | |
import com.codahale.metrics.Timer | |
import groovy.transform.stc.ClosureParams | |
import groovy.transform.stc.FirstParam | |
import groovy.util.logging.Log4j | |
@Log4j | |
class MetricsMethodUtilsService { | |
MetricRegistry metricRegistry |
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
$Applist = Get-AppXProvisionedPackage -online | |
$Applist | WHere-Object {$_.packagename -like “*3DBuilder*”} | Remove-AppxProvisionedPackage -online | |
#$Applist | WHere-Object {$_.packagename -like “*Appconnector*”} | Remove-AppxProvisionedPackage -online | |
$Applist | WHere-Object {$_.packagename -like “*BingFinance*”} | Remove-AppxProvisionedPackage -online | |
$Applist | WHere-Object {$_.packagename -like “*BingNews*”} | Remove-AppxProvisionedPackage -online | |
$Applist | WHere-Object {$_.packagename -like “*BingSports*”} | Remove-AppxProvisionedPackage -online | |
$Applist | WHere-Object {$_.packagename -like “*BingWeather*”} | Remove-AppxProvisionedPackage -online | |
$Applist | WHere-Object {$_.packagename -like “*CommsPhone*”} | Remove-AppxProvisionedPackage -online | |
#$Applist | WHere-Object {$_.packagename -like “*ConnectivityStore*”} | Remove-AppxProvisionedPackage -online |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 org.gradle.api.tasks.testing.logging.TestExceptionFormat | |
import org.gradle.api.tasks.testing.logging.TestLogEvent | |
tasks.withType(Test) { | |
testLogging { | |
// set options for log level LIFECYCLE | |
events TestLogEvent.FAILED, | |
TestLogEvent.PASSED, | |
TestLogEvent.SKIPPED, | |
TestLogEvent.STANDARD_OUT |
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
def sessionFactory = Holders.applicationContext.getBean('sessionFactory') | |
ClassMetadata hibernateMetaClass = sessionFactory.getClassMetadata(User) | |
def mappedTable = hibernateMetaClass.getTableName() | |
print("User domain class is mapped to database table '$mappedTable') |
OlderNewer