Instantly share code, notes, and snippets.

View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\tablacus\tablacus.nupkg" checksum="F00CBEA73D92DE8A1BCB438AB5AB6F83" />
<file path="C:\ProgramData\chocolatey\lib\tablacus\tablacus.nuspec" checksum="1C0EF97F1D5F8664CB894345D2B2B76C" />
<file path="C:\ProgramData\chocolatey\lib\tablacus\te190116.zip.txt" checksum="68E76FB00855D4DF572559F194AC8501" />
<file path="C:\ProgramData\chocolatey\lib\tablacus\legal\LICENSE.txt" checksum="231DE705D3C6516AD5990939CCBF2F51" />
<file path="C:\ProgramData\chocolatey\lib\tablacus\legal\VERIFICATION.txt" checksum="A3851BFF02CEF11C80307ABF16F7D8FB" />
<file path="C:\ProgramData\chocolatey\lib\tablacus\tools\chocolateyInstall.ps1" checksum="1A7713CFFCD14294E6E9DC29ED2CBEFD" />
<file path="C:\ProgramData\chocolatey\lib\tablacus\tools\readme.txt" checksum="7718F9734004D5C17244C5555CB61B30" />
View wipe_expired_subs.py
import logging
import time
from dramafever.inapp_payments.tasks import process_receipt
from dramafever.premium.models import InAppReceipt, UserSubscription, PremiumState
LOGGER = logging.getLogger(__name__)
expired_subs = UserSubscription.objects.filter(
merchant_type__isnull=True,
View XRMOrgSvcExtensions.cs
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using System.Xml;
namespace Cinteros.Xrm.FetchXmlBuilder.AppCode
{
public static class ServiceExtensions
{
public static string QueryExpressionToFetchXml(this IOrganizationService organizationService, QueryBase query)
View untrusted-lvl1-solution.js
/*****************
* cellBlockA.js *
*****************
*
* Good morning, Dr. Eval.
*
* It wasn't easy, but I've managed to get your computer down
* to you. This system might be unfamiliar, but the underlying
* code is still JavaScript. Just like we predicted.
*
View D8 - Services
D8 - Services
...
lightning-8/modules/custom/basic/basic.services.yml
services:
basic.basic_hero_articles:
class: Drupal\basic\BasicArticleService
View rancher-singlenodeinstall-selfsignedcert.sh
#!/bin/bash
if [[ $DEBUG == "true" ]]; then
set -x
fi
# Check if FQDN is given
if [ -z "$1" ]; then
echo "Usage: $0 rancher.yourdomain.com"
exit 1
fi
View gist:20ea45282e40352c5635dc23cdc66d20
Assumptions:
I should guard against any negative doubles.
Test Cases:
1.00 --> "Your change is 1 dollar."
1.01 --> "Your change is 1 dollar and 1 penny."
1.41 --> "Your change is 1 dollar and 1 quarter and 1 dime and 1 nickel and 1 penny."
View circle.rb
#!/usr/bin/env ruby
require "fileutils"
require "shellwords"
require "yaml"
CIRCLE1_DEFAULT_CACHE_DIRECTORIES = [
"vendor/bundle",
"~/.m2",
"~/.bundle",
View docker_awscli.sh
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# enable interruption signal handling
trap - INT TERM
docker run --rm \
View broom.sh
#!/bin/sh
git branch -r | awk -Forigin/ '/\/BRANCH-[0-9]{4}([[:print:]])/{print $2}' | xargs -I {} git push origin :{}