Skip to content

Instantly share code, notes, and snippets.

Craig Wayne craigiswayne

Block or report user

Report or block craigiswayne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@craigiswayne
craigiswayne / setup.md
Last active Aug 7, 2019
Sass \ Scss NPM Setup
View setup.md

How to Setup npm and scss \ sass

npm init
npm install node-sass --save
mkdir assets
touch assets/styles/style.scss
mkdir dist
@craigiswayne
craigiswayne / cssFromElement.js
Last active Apr 18, 2019
Extract all computed css from an element
View cssFromElement.js
function getAllCSS(element){
if( !element instanceof HTMLElement ){
console.warn("Select a valid HTML Element before proceeding");
return '';
}
let cssString = '';
const cssObj = window.getComputedStyle(element);
let cssAttributes = [];
@ebidel
ebidel / coverage.js
Last active Aug 13, 2019
CSS/JS code coverage during lifecycle of page load
View coverage.js
Moved to https://github.com/ebidel/puppeteer-examples
@jhades
jhades / 01.ts
Last active Jul 18, 2019
ng-template, ng-container and ngTemplateOutlet examples
View 01.ts
@Component({
selector: 'app-root',
template: `
<ng-template>
<button class="tab-button"
(click)="login()">{{loginText}}</button>
<button class="tab-button"
(click)="signUp()">{{signUpText}}</button>
</ng-template>
View aligning-images.md

Aligning images

left alignment

This is the code you need to align images to the left:

<img align="left" width="100" height="100" src="http://www.fillmurray.com/100/100">
@tatemz
tatemz / docker-wordpress.sh
Last active Aug 7, 2019
A quick way to get a WordPress installation up and running with Docker
View docker-wordpress.sh
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
version: "2"
services:
my-wpdb:
@FMCorz
FMCorz / kodi.sql
Last active Mar 23, 2018
Find duplicate movies in Kodi
View kodi.sql
-- Find the file ~/.kodi/userdata/MyVideosXX.db
-- Open with sqlite3
-- Run the following statement:
SELECT
m.c00, -- Movie name
p.strPath, -- Path
f.strFilename -- File name
FROM movie m
@gokulkrishh
gokulkrishh / media-query.css
Last active Aug 23, 2019
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@hootlex
hootlex / laravellocal.md
Last active Aug 18, 2019
Run laravel project locally
View laravellocal.md

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
@emilysnothere
emilysnothere / my_custom_field.php
Last active May 23, 2018
Gravity Form Custom Hidden Fields
View my_custom_field.php
<?php
class My_Custom_Field extends \GF_Field
{
public $type = 'my_custom_field';
public function get_form_editor_button()
{
return array(
'group' => 'advanced_fields',
'text' => __('My Custom Field', 'gravityforms')
You can’t perform that action at this time.