- download and install linqpad https://www.linqpad.net
- open linqpad
- click "add connection"
- dont change anything and click "Next"
- under provider, choose "SQL CE 4.0"
- under database, click "Browse"
- find and choose your database, for umbraco its
App_Data/Umbraco.sdf
- click TEST. If you get something like "the required DbProvider registration is not present" or "Unable to find Requested .Net Framework Data Provider", make sure SQL CE 4.0 runtime is installed: https://www.microsoft.com/en-au/download/details.aspx?id=17876
- click OK
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
@{ | |
Layout = null; | |
} | |
<!-- OVERWRITE BELOW THIS LINE --> |
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
// https://support.microsoft.com/en-gb/help/307996/how-to-create-an-asp-net-http-module-using-visual-c-net | |
namespace Cool.Website | |
{ | |
public class CoolHttpModule : IHttpModule | |
{ | |
private const string filename = "a.gif"; | |
private const string onePixelGif = @"R0lGODlhAQABAPcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
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 ExampleController : UmbracoApiController | |
{ | |
[HttpGet] | |
public IHttpActionResult GetFile() | |
{ | |
var stream = new MemoryStream(); // well.. a MemoryStream | |
var result = new HttpResponseMessage(HttpStatusCode.OK) | |
{ | |
Content = new ByteArrayContent(stream.GetBuffer()) | |
}; |
https://gist.github.com/nobitagit/729fc16b8c16edb9a2fe390d6f312c66
u
undo
<C + r>
undo
x
delete char
0
begining of line
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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
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 ClosedXML.Excel; | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Web.Mvc; | |
namespace ExcelExample.Api.PrivateControllers | |
{ | |
public class ExcelController : Controller | |
{ |
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 ClosedXML.Excel; | |
using GHPHealthApp.Api.Persistence; | |
using GHPHealthApp.Api.Services; | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Web.Mvc; | |
using Umbraco.Web.Mvc; | |
namespace GHPHealthApp.Api.PrivateControllers |
- create an app on facebook
- get
client_secret
andclient_id
from the app page - get an
access_token
:https://graph.facebook.com/oauth/access_token?client_id={client_id}&client_secret={client_secret}&grant_type=client_credentials
- get something:
https://graph.facebook.com/{page_id}/posts?access_token={access_token_from_3}&fields=attachments,message,created_time,type,target,link
Some endpoints require more permissions (manage_pages for page reviews etc). You request these on the app page.
check for breaking changes: https://docs.litium.com/documentation/release-notes
- Open "Manage NuGet packages for solution".
- Go to Updates tab
- Search for "litium"
- Check "Update all" (maybe different text?)
- Click Update.
- Wait.
(6.5. Run
website\packages\Litium.Setup.Core.6.1.1\tools\Upgrade_PreRequires.sql
in SQL studio to check if database update will work) - Open Package Manager Console and execute "Update-LitiumDatabase"