Skip to content

Instantly share code, notes, and snippets.

View Luciaisacomputer's full-sized avatar
💭
In yer source code checking yer accessibilities

Lucia Adams Luciaisacomputer

💭
In yer source code checking yer accessibilities
View GitHub Profile
@RyKilleen
RyKilleen / setup.ps1
Last active September 8, 2022 01:16
Choco Install / System setup
choco install choco.config
#### System Settings
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
Set-ItemProperty $key Hidden 1 # Show Hidden Files
Set-ItemProperty $key HideFileExt 0 # Don't Hide File Extensions
Set-ItemProperty $key ShowSuperHidden 1 # Show Hidden System Files
Stop-Process -processname explorer # Reset Explorer
# Put this in your .zshrc or .bashrc file
# Install `tree` first — brew install tree
function t() {
# Defaults to 3 levels deep, do more with `t 5` or `t 1`
# pass additional args after
tree -I '.git|node_modules|bower_components|.DS_Store' --dirsfirst --filelimit 15 -L ${1:-3} -aC $2
}
@engelen
engelen / gist:9df926bd9f3957394d89
Last active November 17, 2017 15:57
Use WordPress dashicons in your theme on the frontend.
<?php
add_action( 'wp_enqueue_scripts', 'mytheme_scripts' );
/**
* Enqueue Dashicons style for frontend use
*/
function mytheme_scripts() {
wp_enqueue_style( 'dashicons' );
}
@kentcdodds
kentcdodds / get-watchers.js
Last active December 4, 2023 22:34
Get Watchers of element and its children
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));
@zenorocha
zenorocha / multiple-3rd-party-widgets.js
Last active November 14, 2022 12:18
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@joshenders
joshenders / gist:3977873
Last active March 9, 2016 21:35
Install Unreal 2004 on Mac from Demo
@jo-snips
jo-snips / custom_tribe_meta_event_cats.php
Created June 21, 2012 17:37
The Events Calendar: Custom tribe_meta_event_cats
<?php
$terms = wp_get_post_terms(get_the_ID(), 'tribe_events_cat');
$count = count($terms);
if ( $count > 0 ){
foreach ( $terms as $term ) {
echo '<a href="'. get_term_link($term->slug, 'tribe_events_cat') .'" class="cat_' . $term->slug . '">' . $term->name . '</a>';
}
}
?>
@yatil
yatil / beanstalkrevisionexample.php
Created August 22, 2011 07:42
Using beanstalks .revision file to assure that the latest CSS gets to the browsers when using aggressive caching
<?php
$content = file('/path/to/.revision');
//First line: $content[0];
define('REV',trim($content[0]));
?>
<link rel="stylesheet" href="style.css?v=<?=REV?>">