Skip to content

Instantly share code, notes, and snippets.

View cdeutsch's full-sized avatar
👨‍🏭
Hire me! Fullstack Engineer open to new developer or manager opportunities.

C Deutsch cdeutsch

👨‍🏭
Hire me! Fullstack Engineer open to new developer or manager opportunities.
View GitHub Profile
partial void btnTrack_TouchUpInside (UIButton sender)
{
Xamarin.Insights.Track("track-clicked", new Dictionary <string, string> {
{"track-local-time", DateTime.Now.ToString()}
});
UIAlertView alert = new UIAlertView ("Done", "Track registered", null, "OK", null);
alert.Show();
}
with TEXT_IO;
procedure name is
begin -- name
TEXT_IO.PUT(" ##### # # ###### ### ##### ");
TEXT_IO.NEW_LINE;
TEXT_IO.PUT("# # # # # # # # #");
text_io.new_line;
text_io.put("# # # # # # # ");
text_io.new_line;
text_io.put("# ####### ###### # ##### ");
-- TRUNCATE TABLE xam_SFDC_Accounts
INSERT INTO STOREREPLICA.StoreReplica.dbo.xam_SFDC_Accounts
SELECT *
FROM OPENQUERY(DBAMP, 'SELECT Id, Name, OwnerId, Owner.Name, Website FROM Account')
SELECT *
FROM STOREREPLICA.StoreReplica.dbo.xam_SFDC_Accounts
$('form.filter-bots').on('submit', function (e) {
var $form = $(this);
var $botCode = $form.find('#BotCode');
if ($botCode.length === 0) {
$botCode = $('<input id="BotCode" name="BotCode" value="" type="hidden" />');
$form.prepend($botCode);
}
$botCode.val('RzipU6QGMMNh7d');
});
@cdeutsch
cdeutsch / gist:9712308
Created March 22, 2014 18:49
Scrape Google Site List
function md5cycle(x, k) {
var a = x[0], b = x[1], c = x[2], d = x[3];
a = ff(a, b, c, d, k[0], 7, -680876936);
d = ff(d, a, b, c, k[1], 12, -389564586);
c = ff(c, d, a, b, k[2], 17, 606105819);
b = ff(b, c, d, a, k[3], 22, -1044525330);
a = ff(a, b, c, d, k[4], 7, -176418897);
d = ff(d, a, b, c, k[5], 12, 1200080426);
@html.extend('layout', function(model){
@html.block('content', function(model){
<h2>@model.channel</h2>
<table class="table table-bordered">
@model.buffer.forEach(function(msg){
<tr>
<td>
SELECT 34 AS [product_id],
SUBSTRING(CAST(NEWID() AS nvarchar(50)), 1, 5) + '-' + SUBSTRING(CAST(NEWID() AS nvarchar(50)), 1, 5) + '-' + SUBSTRING(CAST(NEWID() AS nvarchar(50)), 1, 5) + '-' + SUBSTRING(CAST(NEWID() AS nvarchar(50)), 1, 5) + '-' + SUBSTRING(CAST(NEWID() AS nvarchar(50)), 1, 5) AS [license_code], -- can we gen this from SQL or join into a table of available codes?
0 AS [refunded],
UniversityStartDate AS [purchase_ts],
null AS [order_id],
CustomerID AS [customer_id],
CustomerID AS [user_id],
UniversityStartDate AS [first_activation_ts],
UniversityEndDate AS [valid_until_ts],
NULL AS [grandfather_price],
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Alchemy;
using Alchemy.Classes;
using System.Net.Http;
using Newtonsoft.Json;
var irc = require("irc");
var pushover = require( 'pushover-notifications' );
// Create the configuration
var ircConfig = {
channels: ["#web", "#dogs"],
server: "irc.company.com",
botName: "nodebot",
watch: 'christopher'
};
-- sum by year/month
SELECT subs.Year, subs.Month,
SUM(FirstOrderTotal) AS [FirstOrderTotal],
SUM(FuturOrderTotals) AS [FuturOrderTotals],
SUM(LookupRenewalValue) AS [LookupRenewalValue],
SUM(FactoredRenewaValue) AS [FactoredRenewaValue]
FROM (
-- get first and future order totals
SELECT cs.CustomerId, YEAR(cs.CreatedOn) AS [Year], MONTH(cs.CreatedOn) AS [Month],