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
#ubuntu 12 | |
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/example.com | |
#ubuntu 14 | |
sudo cp /etc/apache2/sites-available/000-default.config /etc/apache2/sites-available/example.com.config | |
sudo nano /etc/apache2/sites-available/example.com | |
ServerName example.com |
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
drush dl ckeditor | |
drush en -y ckeditor | |
drush ckeditor-download | |
drush make-generate [fileName].make |
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
-- create drupal databases | |
mysql -u root -p | |
CREATE DATABASE drupal; | |
CREATE USER drupaluser@localhost IDENTIFIED BY 'password'; | |
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES ON drupal.* TO drupaluser@localhost; | |
FLUSH PRIVILEGES; |
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
git config --global url."https://".insteadOf git:// | |
git config --global --unset url."https://".insteadOf |
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
<!-- requires DNN 7.2 or higher --> | |
<%@ Register TagPrefix="dnn" TagName="JavaScriptLibraryInclude" Src="~/admin/Skins/JavaScriptLibraryInclude.ascx" %> | |
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %> | |
<asp:Panel ID="ScopeWrapper" runat="server"> | |
<!-- things to bind here --> | |
</asp:Panel> | |
<dnn:JavaScriptLibraryInclude runat="server" Name="knockout" version="3.1.0" /> | |
<dnn:JavaScriptLibraryInclude runat="server" Name="knockout.mapping" version="2.4.1" /> |
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
//taken from: http://stackoverflow.com/questions/13475674/updating-a-contact-with-ews | |
Contact updateContact = Contact.Bind(service, itemId); | |
updateContact.GivenName = customContact.Name; | |
updateContact.Surname = customContact.Surname; | |
EmailAddress emailAddress; | |
bool emailAddressFound; | |
emailAddressFound = updateContact.EmailAddresses.TryGetValue(EmailAddressKey.EmailAddress1, out emailAddress); |
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
$(window).bind('beforeunload', function() { | |
var prompt = true; //if you dont return anything, the page will continue as normal | |
if (prompt) | |
return 'You have unsaved changes'; | |
}); |
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
(function () { | |
function Task(data) { | |
this.title = ko.observable(data.title); | |
this.isDone = ko.observable(data.isDone); | |
} | |
function TaskListViewModel() { | |
// Data | |
var self = this; | |
self.tasks = ko.observableArray([]); |
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 PagedResult<T> { | |
public List<T> Items { get; set; } | |
public long CurrentPage { get; set; } | |
public long ItemsPerPage { get; set; } | |
public long TotalItems { get; set; } | |
public long TotalPages { get; set; } | |
public string Text { get; set; } | |
} |
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
CONVERT(CAST(CONVERT(latin1_field USING latin1) AS BINARY) USING utf8) | |
-- more : http://jonisalonen.com/2012/fixing-doubly-utf-8-encoded-text-in-mysql/ |