Skip to content

Instantly share code, notes, and snippets.

View ldhertert's full-sized avatar

Luke Hertert ldhertert

  • Harness
  • Columbus, OH
View GitHub Profile
[
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
{ "keys": ["ctrl+o"], "command": "prompt_open_file" },
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} },
{ "keys": ["ctrl+n"], "command": "new_file" },
{ "keys": ["ctrl+s"], "command": "save" },
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" },
{ "keys": ["ctrl+f4"], "command": "close_file" },
{ "keys": ["ctrl+w"], "command": "close_file" },
SELECT *
FROM wp_posts
LEFT JOIN wp_term_relationships ON(wp_posts.ID = wp_term_relationships.object_id)
LEFT JOIN wp_term_taxonomy tax_type ON(wp_term_relationships.term_taxonomy_id = tax_type.term_taxonomy_id)
LEFT JOIN wp_term_taxonomy tax_client ON(wp_term_relationships.term_taxonomy_id = tax_client.term_taxonomy_id)
LEFT JOIN wp_terms terms_type ON(tax_type.term_id = terms_type.term_id)
LEFT JOIN wp_terms terms_client ON(tax_client.term_id = terms_client.term_id)
WHERE wp_posts.post_type = 'portfolio'
AND wp_posts.post_status = 'publish'
AND tax_type.taxonomy = 'type'
$server = "127.0.0.1"
$username = "username"
$password = "password"
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$session_opts = New-PSSessionOption -SkipCNCheck -SkipCACheck
$creds = New-Object System.Management.Automation.PsCredential $username,$password
Enter-PSSession -ComputerName $server -SessionOption $session_opts -Credential $creds -UseSSL
@ldhertert
ldhertert / Expressions.cs
Created April 12, 2011 18:51
This is ugly. Never meant for anyone else to see
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using Core.Extensibility.Extensions;
using System.ComponentModel;
using System.Reflection;
using System.ComponentModel.DataAnnotations;
@ldhertert
ldhertert / MenuStyle.cshtml
Created June 22, 2011 20:15
Advance Menu Style fix
<style type="text/css">
@if (!string.IsNullOrWhiteSpace(Model.ContentPart.BackColor)){
<text>#menu-@(Model.MenuId).sf-menu li {
background: @(Model.ContentPart.BackColor);
}</text>
}
@if (!string.IsNullOrWhiteSpace(Model.ContentPart.ForeColor)){
<text>
#menu-@(Model.MenuId).sf-menu a,
#menu-@(Model.MenuId).sf-menu a:visited {
@ldhertert
ldhertert / TestContentQuery.cs
Created June 29, 2011 19:16
Linq implementation of ContentQuery
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using NHibernate;
using NHibernate.Criterion;
using NHibernate.Impl;
using NHibernate.Linq;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Records;
Add-PSSnapin WebAdministration
$sites = ls IIS:\Sites
foreach ($site in $sites) {
$debug = Get-WebConfigurationProperty -filter system.web/compilation -name debug -PSPath $site.PSPath
if ($debug.Value) {
Set-WebConfigurationProperty -filter system.web/compilation -name debug -PSPath $site.PSPath -value false
echo $site.Name
}
@ldhertert
ldhertert / gist:1370573
Created November 16, 2011 16:35
SignalR Orchard
public IEnumerable<RouteDescriptor> GetRoutes()
{
var routeCollection = new RouteCollection();
routeCollection.MapConnection<MyConnection>("echo", "echo/{*operation}");
return GetConferenceRoutes()
.Concat(GetSchoolRoutes())
.Concat(GetTeamRoutes())
.Concat(GetTeamSeasonRoutes()
.Concat(GetGameRoutes())
@ldhertert
ldhertert / download-and-build-openzwave.ps1
Last active October 15, 2015 19:47
Windows Open-ZWave compilation for node-openzwave-shared
#This script will download a modified version of open-zwave (added support for visual studio 2013 and x64), build them and copy required files to ./libs/open-zwave
#Requirements
### cwd is root of your project
### You have visual studio 2013 installed with C++ build tools
### msbuild is in your path
$ErrorActionPreference = "Stop"
Push-Location
@ldhertert
ldhertert / dumpbin-all-exports
Created November 21, 2015 18:36
ozw dumpbin
This file has been truncated, but you can view the full file.
Microsoft (R) COFF/PE Dumper Version 14.00.23026.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file C:\Users\LukeHertert\AppData\Local\OpenZWave\bin\openzwave.lib
File Type: LIBRARY
Archive member name at 8: /
5650B104 time/date Sat Nov 21 12:59:32 2015