Skip to content

Instantly share code, notes, and snippets.

View kweigand's full-sized avatar

Ken Weigand kweigand

View GitHub Profile
@kweigand
kweigand / config,js
Created October 20, 2015 19:04
example of config.js
/**=========================================================
* Module: config.js
* App routes and resources configuration
=========================================================*/
App.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$compileProvider', '$filterProvider', '$provide', '$ocLazyLoadProvider', 'APP_REQUIRES',
function ($stateProvider, $urlRouterProvider, $controllerProvider, $compileProvider, $filterProvider, $provide, $ocLazyLoadProvider, appRequires) {
'use strict';
console.log("In the config.js");
App.controller = $controllerProvider.register;
@kweigand
kweigand / wundergroudapi.js
Created June 6, 2014 16:48
wunderground api
var data2= new Array();
var items= new Array();
$.ajax({
dataType: "jsonp",
cache: true,
url: 'http://api.wunderground.com/api/c901ba8827136492/history_20000405/q/CA/San_Francisco.json',
data: data2,
success: function(data2){ // do something here
@kweigand
kweigand / wunderground.html
Last active August 29, 2015 14:02
Broken wunderground
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<title>Document</title>
</head>
<body>
<script>
jQuery(document).ready(function($) {
$.ajax({
url : "http://api.wunderground.com/api/c901ba8827136492/history_20000405/q/CA/San_Francisco.json",
dataType : "jsonp",
success : function(parsed_json) {
var temp_m = parsed_json['tempm']; //tempm Temp in C
var temp_eng = parsed_json['tempi']; //tempi Temp in F
var dew_point_m = parsed_json['dewptm']; //dewptm Dewpoint in C
var dew_point_eng = parsed_json['dewpti']; //dewpti Duepoint in F
var wind_speed_m = parsed_json['wspdm']; //wspdm WindSpeed kph
(function ($) {
Drupal.behaviors.appointment = {
attach: function(context, settings) {
//Begin my code
$(document).ready(function() {
$('p .help-block').hide();
$('p .help-block').append('<a id="descriptionhelp"><i class="fa fa-question-circle"></i></a>').click(function() {
$('p.help-block').toggle()
});
@kweigand
kweigand / form_send.php
Last active December 22, 2015 00:58
parses a form and emails results also does validation
<?php
if(isset($_POST['email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "ken@getleadsfast.com"; // lwelsh@thompsonkane.com csayers@thompsonkane.com
$email_subject = "A Lead from the TK Website to follow-up";
function died($error) {
// your error code can go here
@kweigand
kweigand / base_drupal_build.make
Created February 19, 2013 02:10
My make file for base Drupal Site need to add library for superfish menu need to install ckeditor
; ----------------
; Core makefile custom bulid by Kenneth Weigand
; Generated makefile from http://drushmake.me
; Permanent URL: http://drushmake.me/file.php?token=b720bc8528fc
; ----------------
;
; This is a working makefile - try it! Any line starting with a `;` is a comment.
; Core version
; ------------
@kweigand
kweigand / Nav.example
Created February 6, 2013 04:36
My nav in html
<nav class="nav-main">
<li><a href="#"><div class="navi-main-btn">
<div class="btn-top"><h3>WHO</h3> </div><div class="btn-btm"><h5>WE ARE</h5></div>
</div> </a></li>
<li><a href="#"><div class="navi-main-btn">
<div class="btn-top"><h3>WHAT</h3> </div><div class="btn-btm"><h5>WE DO</h5></div>
</div></a> </li>
<li><a href="#" ><div class="navi-main-btn">
<div class="btn-top"><h3>WHEN</h3> </div><div class="btn-btm"><h5>WE DO</h5></div>
</div></a> </li>
@kweigand
kweigand / drupal_instal
Last active December 11, 2015 18:48
Drupal install initial settings
Copy the default.settings.php to settings.php.
Do this from the command line (working from the root of the directory containing your Drupal installation) by typing
cp sites/default/default.settings.php sites/default/settings.php.
Please note: Do not simply rename the file. The Drupal installer needs both files.
You should now have a default.settings.php AND a settings.php file in your sites/default directory.
Make the settings file writeable, so that the installer can edit it, type
md sites/default/files