Skip to content

Instantly share code, notes, and snippets.

cloudflying /
Created Oct 26, 2017
Backup Link Lists - Shopify

##Backup your Navigation Menus on Shopify

NOTICE: FREE FOR USE, no warranties or liabilities for misuse of the following code - use at your own risk!

  1. Create a new page template - in your Shopify Code Editor
  2. Paste the code in the page.linkbackup.liquid gist below
  3. Create a new page on your site and set the template to the name you used in step 2.
  4. Navigate to the page, right click and hit VIEW SOURCE.
  5. Save text of source somewhere as a backup.

Try the following: Connect to the synology nas using SSH and "ADMIN ACCOUNT" and issue the following commands:

sudo su (This command will ask por admin password)
cd /var/packages/Plex Media Server/scripts
./start-stop-status start

To verify it is running yo can issue the following command:

ps -fea | grep target/Plex\ Media
View dns-verify.ps1
Function Get-DNSValid
PARAM ($websiteUrl, $company)
## Company should be the string value of NETNAME in a ARIN whois lookup.
## To find out your value, open and copy the value (replace with your IP)
## website url can be any DNS resolved value (even internal if using internal DNS system)
$primaryResult = Resolve-DnsName -Name $websiteUrl -Type A -DnsOnly;
View Generate Full SQL Query - Parameters ADDED
Public Function ActualCommandTextByNames(
ByVal sender As IDbCommand) As String
Dim sb As New System.Text.StringBuilder(sender.CommandText)
Dim EmptyParameterNames =
From T In sender.Parameters.Cast(Of IDataParameter)()
Where String.IsNullOrWhiteSpace(T.ParameterName)
If EmptyParameterNames IsNot Nothing Then
cloudflying / sql-executescalar.vb
Created Aug 28, 2012
grab a single value from sql
View sql-executescalar.vb
Using conn As New SqlConnection(connectionString)
Using cmd As New SqlCommand
With cmd
.Connection = conn
.CommandText = "SELECT value FROM table;"
Dim var as string = .ExecuteScalar()
End With
End Using
cloudflying / web.config
Created Aug 26, 2012
Web.config url rewrite
View web.config
<rule name="rw_page_address" stopProcessing="true">
<match url="^url/value/([_0-9a-z-]+)"/>
<action type="Rewrite" url="aPage.aspx?msg={R:1}&amp;value=2"/>
cloudflying / twilio-make-a-call.vb
Created Aug 26, 2012
Make a Phone call with Twilio
View twilio-make-a-call.vb
Imports System.Net
Imports System.Text
Imports System.IO
Public Function makeaCall() as string
Dim AccountSID As String = "aaaaaaa"
Dim authToken As String = "123"
Dim uri As String = "" & AccountSID & "/Calls"
Dim data As String = "From=+15551234567&To=+15557654321&Url=[0]=You%20have%20successfully%20called%20me!&Method=POST"