Skip to content

Instantly share code, notes, and snippets.

View biapar's full-sized avatar
🙂

Biagio Paruolo biapar

🙂
View GitHub Profile
@biapar
biapar / InitArcheType
Last active October 18, 2015 11:03
How to read and write to Umbraco Archetype
var archetypeValueAsString = member.GetValue<string>("figli");
var member = Services.MemberService.GetById(user.Id);
if (archetypeValueAsString == null)
{
//var archetype2 = JsonConvert.DeserializeObject<ArchetypeModel>(archetypeValueAsString);
ArchetypeModel a = new ArchetypeModel();
@KevinJump
KevinJump / documentlist.cshtml
Last active February 19, 2020 16:19
Umbraco Macro file to render a list of documents on a page
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using Umbraco.Web.Models
@{
var folders = Model.GetParameterValue<string>("mediaFolder", "")
.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
var subFolders = Model.GetParameterValue<bool>("subFolders", true);
var selection = Umbraco.TypedMedia(folders).Where(x => x != null);

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.
@ErisDS
ErisDS / examples.md
Last active January 14, 2025 22:52
Ghost Filter Query examples

Filter Queries - Example Use Cases

Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)

Fetch 3 posts with tags which match 'photo' or 'video' and aren't the post with id 5.

api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});

GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3

@tbranyen
tbranyen / _usage.md
Last active August 15, 2024 21:13
OpenWeatherMap / Weather Icons integration
  1. Include Weather Icons in your app: https://github.com/erikflowers/weather-icons

  2. Include the below JSON in your application, for example purposes, lets assume it's a global named weatherIcons.

  3. Make a request to OpenWeatherMap:

req = $.getJSON('http://api.openweathermap.org/data/2.5/weather?q=London,uk&callback=?');
@magnetikonline
magnetikonline / README.md
Last active November 10, 2022 00:45
Reset Windows 2012R2 local administrator password.

Reset Windows 2012R2 local administrator password

  • Boot from Microsoft Windows Server 2012R2 DVD/ISO.
  • From the Windows Setup menu, click "Next".
  • Select "Repair your computer".
  • Click on "Troubleshoot".
  • Under Advanced options, click "Command Prompt".

At the command prompt, run the following commands:

@nul800sebastiaan
nul800sebastiaan / TicketOrderController.cs
Created February 9, 2015 16:09
TicketOrderController.cs
using System;
using System.Linq;
using System.Web.Mvc;
using Umbraco.Course.Models;
using Umbraco.Web.Mvc;
namespace Awesome.FormDemo.Controllers
{
public class TicketOrderController : SurfaceController
{
@splacento-incomm
splacento-incomm / hacked wordpress scan
Created January 22, 2015 05:40
Hacked wordpress can /usr/bin/host
/usr/bin/host has been preloaded;
grep -ri --include=*.php "/usr/bin/host" ./
check all cronjobs:
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
check running processes:
ps -aux
anonymous
anonymous / Login-and-Sidemenu-with-IONIC-Framework.markdown
Created May 10, 2014 12:43
A Pen by Biagio Paruolo.
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 10, 2025 09:31
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k