This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GIF Direct Link (Tenor & Giphy) | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Add direct link buttons for Tenor and Giphy GIFs | |
// @match https://tenor.com/view/* | |
// @match https://giphy.com/gifs/* | |
// @match https://giphy.com/embed/* | |
// @grant none | |
// @author pyronaur |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zx | |
// Pass --verbose to see the full output | |
$.verbose = argv.verbose; | |
const php = { | |
is: (file) => file.match(/\.php$/), | |
fix: async (file) => { | |
const result = await nothrow($`pnpm run -w php:autofix ${file}`); | |
// php:autofix outputs the fixes to stderr for some reason. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zx | |
// Pass --verbose to see the full output | |
$.verbose = argv.verbose; | |
function isPHP(filename) { | |
return filename.match(/\.php$/); | |
} | |
function isJS(filename) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Clear CI Activity Notification | |
// @version 1.0.0 | |
// @grant none | |
// @match https://github.com/notifications | |
// ==/UserScript== | |
const notifications = document.querySelectorAll('.notifications-list-item') | |
const ciNotifications = Array.from(notifications).filter( (el) => { | |
return el.querySelector('div > div > span').innerText === "ci activity" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test Case</title> | |
<link rel="stylesheet" href="style.css"/> | |
</head> | |
<body> | |
<div id="foobar">doobar</div> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function seventeen_child_video_condition() { | |
return (is_front_page() || ( function_exists('phort_is_portfolio') && phort_is_portfolio() ) ); | |
} | |
// Modify the header arguments | |
// PHP 5.3+ | |
add_filter('twentyseventeen_custom_header_args', function($args){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function download_floor($downloads) { | |
$length = strlen( $downloads ); | |
$divider = intval( '1' . str_repeat( '0', $length - 1 ) ); | |
return floor( $downloads / $divider ) * $divider; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* You can read more about this gist here: | |
* http://justnorris.com/manage-css-z-index/ | |
* | |
*/ | |
@require "layers.styl" | |
@require "z_index_layer.styl" | |
@require "usage.styl" | |
@require "z_index_debug.styl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This Works | |
.the-thing | |
color: blue | |
@media screen and (min-width: 768px) | |
color: red | |
// This is broken | |
$breakpoint = "screen and (min-width: 768px)" | |
.the-thing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<templateSet group="WordPress"> | |
<template name="aa" value="add_action( '$hook$', '$callback$' ); $END$" description="add_action" toReformat="false" toShortenFQNames="true"> | |
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="false" /> | |
<option name="HTML" value="false" /> | |
<option name="XSL_TEXT" value="false" /> | |
<option name="XML" value="false" /> |
NewerOlder