Skip to content

Instantly share code, notes, and snippets.

Why build a site? Why do your customers care?

The core purpose of a website is to help your customers answer the questions necessary to do business with you.

If your website is a series of answers to questions then the success of your site depends on what questions you answer--it's the questions and answers that show the customer you provide a service they're looking for, you're a good choice and that they should buy from you.

In general every customer has the following questions:

  1. Who are you?
  2. What do you offer?

Wagtail tutorial

Thanks to [Serafeim Papastefanos] for authoring this tutorial. Please note that the installation process is in flux; most of the steps here should soon be unnecessary.

[Wagtail] is a new Open Source [Django]-based CMS. In this 20 minute tutorial we will see how you can create a blog from scratch using Wagtail. If you want to see some more examples of usage please take a look at the [wagtaildemo] GitHub project.

To follow this tutorial you will need to have [Python] 2.7 installed with a working version of [pip] and [virtualenv].

Installing the wagtail dependencies

@ajeebkp23
ajeebkp23 / bash_aliases.sh
Last active August 29, 2015 14:22
BashAliases
#common things
alias fwpath='install -Dv /dev/null '
alias w1='cd ~/Documents/folder1/'
alias w2='cd ~/Documents/folder2'
alias pro='ps -ef| g '
alias g='grep '
alias curr='pwd | x'
alias 1234='p manage.py runserver localhost:1234 '
alias 2323='p manage.py runserver localhost:2323 '
alias hserve='p -m SimpleHTTPServer 8080'
@ajeebkp23
ajeebkp23 / vimrc
Last active January 21, 2024 23:23
My vimrc for any system
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set nu
set ic
set is
set smartindent
set clipboard=unnamed,unnamedplus
syntax on
@ajeebkp23
ajeebkp23 / a.py
Created June 2, 2015 11:55
copy current folder into clipoard
import pyperclip
import os
currdir = os.path.abspath(os.path.curdir)
pyperclip.copy(currdir)
@ajeebkp23
ajeebkp23 / .gitignore_wordpress
Last active December 11, 2015 13:48
Wordpress gitignore sample
# Thanks to https://marcjenkins.co.uk/2014/06/a-wordpress-git-workflow/
# Thanks to: https://gist.github.com/jdbartlett/444295
# Ignore everything in the root except the "wp-content" directory.
# you may deal with wp-core yourself or visit http://wp-cli.org
/*
# !.gitignore
!wp-content/
@ajeebkp23
ajeebkp23 / LoginController.java
Created November 25, 2016 18:44 — forked from jewelsea/LoginController.java
JavaFX sample for an fxml based Login screen to main application transition with login session data transfer
package login;
import javafx.event.*;
import javafx.fxml.FXML;
import javafx.scene.control.*;
/** Controls the login screen */
public class LoginController {
@FXML private TextField user;
@FXML private TextField password;
// Source http://stackoverflow.com/a/33787579
Visual Studio only sees git repositories if the .git folder
is used as the store for the git repository.
So, we can fake-out VS by using a different folder for the git store.
Rename the current .git folder to _git (.git dir may be hidden)
Create a text file in that same folder called .git containing
just the line gitdir: _git (make the file via command
line: echo gitdir: _git>.git)
Add _git to your .gitignore file
@ajeebkp23
ajeebkp23 / eWoneSyncUpdateTagValueReqeustFromCSharpC#.cs
Created December 28, 2017 07:21
eWon eSync Update Tag Value Reqeust From CSharp C#
using System.Net;
using(WebClient client = new WebClient())
{
var reqparm = new System.Collections.Specialized.NameValueCollection();
string ipAdddressOfeWon = "192.168.1.68";
string baseUrl = $"http://{ipAdddressOfeWon}/rcgi.binrcgi.bin/UpdateTagForm";
reqparm.Add("TagName", "Br1_Cls_temp");
reqparm.Add("TagValue", 136);
byte[] responsebytes = client.UploadValues(baseUrl, "POST", reqparm);
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
<html>
<body>
<h1>Statistics</h1>
<p>Total codebase size: <xsl:value-of select="//CodebaseCost"/></p>
<p>Code to analyze: <xsl:value-of select="//TotalDuplicatesCost"/></p>
<p>Total size of duplicated fragments: <xsl:value-of select="//CodebaseCost" /></p>