A Pen by Biagio Paruolo on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?language=fra&sensor=false"></script> | |
<script type="text/javascript"> | |
var map; | |
var Markers = {}; | |
var infowindow; | |
var locations = [ | |
[ | |
'Samsung Store Madeleine', | |
'<strong>Samsung Store Madeleine</strong><p>5 Boulevard Malesherbes, 75008 Paris<br>10h – 20h</p>', | |
48.8701925, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Usage: bash uninstall_vmware.bash | |
remove() { | |
entry="$1" | |
echo -ne "Removing \e[1;34m$entry\e[0m... " | |
sudo rm -rf "$entry" &> /tmp/uninstall-vmware.log | |
if [[ ! -e "$entry" ]]; then | |
echo -e "\e[1;32mOK\e[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits Umbraco.Web.Mvc.UmbracoViewPage<IPublishedContent> | |
@using Articulate; | |
@using Articulate.Models; | |
@using Umbraco; | |
@using Umbraco.Web; | |
@using Umbraco.Core; | |
@using Umbraco.Core.Models; | |
@using System.Linq; | |
@using System; | |
@{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits Umbraco.Web.Macros.PartialViewMacroPage | |
@{ var mediaId = Model.MacroParameters["mediaId"]; } | |
@helper DisplayFolder(dynamic folder, bool collapsed) { | |
var items = folder.Children().OrderBy("DocumentTypeAlias Desc,Name"); | |
if (items.Any()) { | |
<a class="list-group-item" role="button" aria-expanded="false" data-toggle="collapse" href="#macro-mediaList-folder-@folder.Id"> | |
<i class="glyphicon glyphicon-folder-open"></i> @folder.Name | |
</a> | |
<div class="list-group @(collapsed?"collapse":"collapse in") well well-sm" id="macro-mediaList-folder-@folder.Id"> | |
@foreach(var item in items) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Web.Mvc; | |
using Archive.FEE.Web.Helper.PDFParser; | |
using Umbraco.Core; | |
using Umbraco.Core.Logging; | |
using Umbraco.Core.Models; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
{ |
If you’re trying to delete a very large number of files at one time (I deleted a directory with 485,000+ today), you will probably run into this error:
/bin/rm: Argument list too long.
The problem is that when you type something like “rm -rf ”, the “” is replaced with a list of every matching file, like “rm -rf file1 file2 file3 file4” and so on. There is a reletively small buffer of memory allocated to storing this list of arguments and if it is filled up, the shell will not execute the program. To get around this problem, a lot of people will use the find command to find every file and pass them one-by-one to the “rm” command like this:
find . -type f -exec rm -v {} \;
My problem is that I needed to delete 500,000 files and it was taking way too long.
OlderNewer