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
using MySql.Data.MySqlClient; | |
using System.Data; | |
public class Admin | |
{ | |
private DataTable GetDatabase(string sqlQuery) | |
{ | |
DataTable returnedData = new DataTable(); | |
MySqlConnection connection = new MySqlConnection(); |
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
#!/usr/bin/env bash | |
########################################################################## | |
# Shellscript: Backup and update WordPress using wp-cli | |
# Author : Paco Orozco <[email protected]> | |
# Requires : wp-cli | |
########################################################################## | |
# Changelog | |
# 20170125: 1.0 | |
# Adds a default option to upgrade only when it's needed. | |
# 20161220: 0.1 |
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
$environmentName = "Production" | |
# Applying web.config transformations | |
$webConfigTransformatorPackages = Join-Path -Path $env:USERPROFILE -ChildPath "\.nuget\packages\WebConfigTransformRunner" | |
$latestWebConfigTranformator = Join-Path -Path ((Get-ChildItem -Path $webConfigTransformatorPackages | Sort-Object Fullname -Descending)[0].FullName) -ChildPath "Tools\WebConfigTransformRunner.exe" | |
$webConfigDirs = Get-ChildItem -Path "$PSScriptRoot\publish" -Recurse -Filter "web*.config" | Select -Property Directory -Unique | |
ForEach ($directory in $webConfigDirs.Directory){ | |
$transformationSource = (Get-ChildItem -Path $directory -Filter ("web." + $environmentName + ".config")) | |
if ($transformationSource) { | |
$guid = [Guid]::NewGuid().ToString() |
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
<configuration> | |
<config> | |
<add key="repositoryPath" value="..\lib" /> | |
</config> | |
</configuration> |
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
# Original : Michalis Georgiou | |
# Modified : D4zzy for Fedora | |
_wgeturl="https://github.com/google/fonts/archive/master.tar.gz" | |
_gf="google-fonts" | |
# install wget | |
echo "Installing wget..." | |
sudo dnf install wget |
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
using Ninject; | |
using Ninject.Modules; | |
using Ninject.Web.Common; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.Mvc; |
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
using Ninject.Modules; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.Http; | |
using System.Web.Http.Dependencies; | |
// A small Library to configure Ninject (A Dependency Injection Library) with a WebAPI Application. |
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 | |
curl_check () | |
{ | |
echo "Checking for curl..." | |
if command -v curl > /dev/null; then | |
echo "Detected curl..." | |
else | |
echo "Installing curl..." | |
apt-get install -q -y curl |
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
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
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
<% | |
'// Usage: | |
'// | |
'// dim l : set l = new logger | |
'// l.log("Hello")("World") | |
'// l.includeTimetamp = false | |
'// l("Lorem ipsum") | |
'// l.setLogFile("c:\temp\log_2.log").log("This is a new log!") | |
'// set l = nothing |