myApp.factory('Excel',function($window){
var uri='data:application/vnd.ms-excel;base64,',
template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
return {
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
public class DemoPage : ContentPage | |
{ | |
public DemoPage () | |
{ | |
var image = new Image () { | |
Source = "http://eric.polerecky.com/images/abstract-1.jpg", | |
VerticalOptions = LayoutOptions.Start, | |
Scale = 3, | |
AnchorY = 0 | |
}; |
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
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; |
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.
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 Umbraco.Core; | |
using Umbraco.Web; | |
using Umbraco.Web.Trees; | |
//https://github.com/marcemarc/uSpinMeRightRound/blob/master/Solution/tooorangey.uSpinMeRightRound/App_Start/RegisterEvents.cs | |
namespace tooorangey.uSpinMeRightRound.App_Start | |
{ | |
public class RegisterEvents : ApplicationEventHandler | |
{ | |
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ |
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
/* Simple Social Icons | |
--------------------------------------------- */ | |
.simple-social-icons li.social-dribbble a { | |
border: 2px solid #ea4c89 !important; | |
color: #ea4c89 !important; | |
} | |
.simple-social-icons li.social-dribbble a:hover { | |
background-color: #ea4c89 !important; |
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
/// <summary> | |
/// Handles the login form when user posts the form/attempts to login | |
/// </summary> | |
/// <param name="model"></param> | |
/// <returns></returns> | |
[HttpPost] | |
public ActionResult HandleLogin(LoginViewModel model) | |
{ | |
if (!ModelState.IsValid) | |
{ |