Skip to content

Instantly share code, notes, and snippets.

[...Array(10)].map((_, i) => {
return <ListGroupProduct key={i} />
})
// OR - Create 10 items from object
const item = {
clientQuote: "",
clientName: "",
clientOrganization: "",
@birksy89
birksy89 / ModulePackage.targets
Created August 22, 2019 15:12
Excluding node_modules folder from DNN Install packages - Front-end Code stored in a folder called "Client"
<?xml version="1.0" encoding="windows-1252"?>
<!-- WARNING, WARNING, WARNING -->
<!-- REMEMBER THAT IF YOU MODIFY THE TARGETS FILE YOU NEED TO CLOSE/OPEN THE PROJECT FOR THE CHANGES TO TAKE EFFECT -->
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="MSBuild.Community.Tasks.Targets" />
<Target Name="PackageModule" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
<div class="pull-right account-tab">
<dnn:login runat="server" id="dnnLogin" /> | <% if (!Request.IsAuthenticated) { %>
<a href="/SwaledaleRegistration?returnurl=<%= HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl) %>">Register</a> <i class="fa fa-user"></i>
<% } else{ %>
<a href="/Activity-Feed/">My Profile</a> <i class="fa fa-user"></i>
<%} %>
</div>
@{
string imgURL = cont.image + "?w=300&h=300&mode=crop&scale=both";
string placeholderURL = "/Portals/0/Graphics/Rondo-Placeholder-300.png";
}
<img src='@(cont.Image ==null ||cont.Image == "" ? placeholderURL : imgURL)'/>
http://10.51.51.91/api/2sxc/app/Rondo-Trip/query/Filter by Continent
http://10.51.51.91/api/2sxc/app/Rondo-Trip/query/Filter by Continent?Continent=Europe
http://10.51.51.91/api/2sxc/app/Rondo-Trip/content/Trip-Content
http://10.51.51.91/api/2sxc/app/Rondo-Trip/content/Trip-Content/1086
https://github.com/2sic/2sxc/wiki/webapi
https://2sxc.org/en/blog/post/new-2sxc-7-using-visual-query-webapi-updated
Might need to enable CORS on IIS if trying to access data remotely:
@birksy89
birksy89 / .gitignore
Created February 21, 2018 16:47
Git Ignore File For Root DNN Project
/App_Data/_imagecache
/App_Data/ClientDependency
/Portals/_default/Logs
/App_Data/Search
/App_Data/Search/segments.gen
/DesktopModules/ToSIC_SexyContent/Upgrade/Log
/imagecache
@birksy89
birksy89 / EventLogging DNN
Last active December 2, 2017 14:42
How to Log an Exception In Dotnetnuke (DNN)
using Andrew.Modules.xxx.Models;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Exceptions;
using System;
using System.IO;
using System.Net;
namespace Andrew.Modules.xxx.Components
{
@birksy89
birksy89 / Instagram API Notes
Last active February 12, 2018 16:29
Notes about Instagrams infuriating API - And how to circumvent oAuth
https://www.instagram.com/purple_creative_studio/media/
https://www.instagram.com/p/BYNer4pj92z/media/?size=l
https://www.instagram.com/p/BYNer4pj92z/media/?size=t
2018 Version:
https://www.instagram.com/purple_creative_studio/?__a=1
@birksy89
birksy89 / TwitterManager.cs
Last active August 11, 2017 12:22
Example of adding User Tweets or Tweets from a query.
using LinqToTwitter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Christoc.Modules.DNNSearchTest.Components
{
public class TwitterManager
@birksy89
birksy89 / Photoshop-Resizer.js
Last active January 11, 2018 09:33
Conditional Resizer, With Subfolder, and Folder Name Checker, and Quality Prompt etc
var imageFolder = Folder.selectDialog("Select a folder to process");
var fWidth = prompt("Width", "1000", "Width2");
var fHeight = prompt("Height", "1000", "Height2");
var fQuality = prompt("Quality 1-100", "70", "Quality2");
if (imageFolder != null) processFolder(imageFolder);
function processFolder(folder) {