Skip to content

Instantly share code, notes, and snippets.

Jacob Bearce JacobDB

Block or report user

Report or block JacobDB

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
@mikowl
mikowl / oneliners.js
Last active Aug 6, 2019
👑 Awesome one-liners you might find useful while coding.
View oneliners.js
// By @coderitual
// https://twitter.com/coderitual/status/1112297299307384833
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// Type this in your code to break chrome debugger in that line.
@ian-p-cooke
ian-p-cooke / add_wsl_exclusions.ps1
Last active May 5, 2019
powershell script to add WSL exclusions
View add_wsl_exclusions.ps1
$win_user = "ipc"
$linux_user = "ipc"
$package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc"
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs"
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin")
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") }
Add-MpPreference -ExclusionPath $base_path
@noelbundick
noelbundick / LICENSE
Last active Aug 16, 2019
Exclude WSL installations from Windows Defender realtime protection
View LICENSE
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tunguskha
tunguskha / Gradient shadow in pure CSS.md
Last active Aug 16, 2019
Gradient shadow in pure CSS
View Gradient shadow in pure CSS.md

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@asadowski10
asadowski10 / acf-relationship-the-event-calendar.php
Last active May 22, 2019
Advanced Custom Fields -Relationship & The Event Calendar past events
View acf-relationship-the-event-calendar.php
<?php
add_filter( 'acf/fields/relationship/query/key=field_59006ee8b9a7b', 'bea_acf_relationship' ), 10, 3 );
/**
*
* Display all events in Relationship field ( future, past )
*
* @param $args
* @param $field
* @param $object_id
@coreyworrell
coreyworrell / README.md
Last active Jul 28, 2017
Migrate ACF Link plugin data to ACF 5.6.0
View README.md

Migrate ACF Link plugin data to ACF Pro 5.6.0

The new version of ACF Pro (5.6.0) adds a built-in link selector field. This makes the ACF Link plugin obsolete.

One problem though is that the ACF Link plugin saved the link's target value as a boolean (0 or 1), and ACF now saves it as an empty string ("") or as _blank.

Disclaimer

@darealshinji
darealshinji / wslpath.sh
Last active Jun 11, 2017
Like cygpath for "Bash on Windows"
View wslpath.sh
moved to https://github.com/darealshinji/scripts/blob/master/wslpath
@danielbachhuber
danielbachhuber / add-rel-nofollow-checkbox.php
Created Feb 13, 2017
Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
View add-rel-nofollow-checkbox.php
<?php
/**
* Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
*
* @see https://danielbachhuber.com/tip/rel-nofollow-link-modal/
*/
add_action( 'after_wp_tiny_mce', function(){
?>
<script>
You can’t perform that action at this time.