Skip to content

Instantly share code, notes, and snippets.

using System;
namespace FiguringOutRatios
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("What width do you wanna use?");
// Ensure you select the table for the grid in the element view on Chrome
var rowList = $($0).find('tr');
var elementList = "Id,Name\r\n";
$(rowList).each(function(i, el){
var thisRow = $(el);
elementList = elementList + thisRow.data('id') + ',' + thisRow.find('.list__item-title').html() + "\r\n";
});
console.log(elementList);
#parent {
height: {height of container};
}
#child {
top: 50%;
margin-top: {50% of height of child};
height: {height of child};
}
@AntMooreWebDev
AntMooreWebDev / Typeahead-BS3-css.css
Last active June 2, 2021 03:24 — forked from bhays/Typeahead-BS3-css
Bootstrap 3 style fixes for using Typeahead.js
.twitter-typeahead .tt-query,
.twitter-typeahead .tt-hint {
margin-bottom: 0;
}
.tt-hint {
display: block;
width: 100%;
height: 38px;
padding: 8px 12px;
.countdown-container {
background-image: url('');
background-size: cover;
background-repeat: no-repeat;
margin: 20px 0px;
background-position: center;
}
.countdown-container > #clockdiv .days,
.countdown-container > #clockdiv .hours,
@AntMooreWebDev
AntMooreWebDev / BootstrapV3MediaQueries.css
Created November 8, 2017 10:47
Media queries for Bootstrap V3, using max-width
@media (max-width:1199px){ /* col-lg */
}
@media (max-width:991px){ /* col-md */
}
@media (max-width:767px){ /* col-sm */
@AntMooreWebDev
AntMooreWebDev / Collapse-All-Diff-Github.js
Created October 26, 2017 16:58
Collapses all diff panes on GitHub
$$('.file-header > .file-actions > button').forEach(function(element){element.click()})
public static class CheckDynamicUmbracoProperties<T>
{
public static T SelectFirstPropertyValueOfGivenAlias(IPublishedContent ChildPage, string PropertyTypeAlias)
{
var query = ((Dictionary<string, IPublishedProperty>
.ValueCollection)ChildPage.Properties)
.Where(x => x.PropertyTypeAlias == PropertyTypeAlias)
.Select(x => x.Value).Cast<T>()
.FirstOrDefault();
@AntMooreWebDev
AntMooreWebDev / ExecuteSqlQuery.cs
Created July 20, 2017 13:46
How to execute a simple SQL query in C#
using(SqlConnection conn = new SqlConnection(connString))
using(SqlCommand command = new SqlCommand(query, conn))
using (SqlDataAdapter dataAdapter = new SqlDataAdapter(command))
dataAdapter.Fill(results);
using (SqlConnection conn = new SqlConnection(connString))
{
conn.open();
using (SqlCommand command = new SqlCommand(query, conn))
@AntMooreWebDev
AntMooreWebDev / HTML5-Template.html
Last active May 11, 2020 20:35
An empty HTML5 template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1' http-equiv='X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title></title>
<!--css here-->
<!--<link rel="stylesheet" type="text/css" href="/css/style.css">-->
</head>