This file contains hidden or 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
{ | |
"useAnimation": { | |
"prefix": "ua", | |
"body": [ | |
"var ${2:animName}", | |
"export function ${1:OverrideName}(): Override {", | |
" ${2: animName} = useAnimation()", | |
" return {", | |
" animate: ${2: animName},", | |
" $3", |
This file contains hidden or 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
import { useRef, useState, useEffect } from "react"; | |
import useFetch from "use-http"; | |
const useGiphy = search => { | |
const [loading, setLoading] = useState(false); | |
const [data, setData] = useState([]); | |
const [request, response] = useFetch("http://api.giphy.com/v1"); | |
useEffect(() => { | |
const getUrl = async () => { |
This file contains hidden or 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
import { useRef, useState, useEffect } from "react"; | |
const useUnsplash = search => { | |
const [loading, setLoading] = useState(false); | |
const [data, setData] = useState([]); | |
useEffect(() => { | |
const getUrl = async () => { | |
var currentSize = 800; | |
const baseUrl = "https://source.unsplash.com"; | |
const route = search === "" ? "/random" : `/featured`; |
This file contains hidden or 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
#!/bin/bash | |
read -p "Input Video: " vid | |
read -p "Known Dimension(VID_WIDTH): " VID_WIDTH | |
read -p "Known Dimension(VID_HEIGHT): " VID_HEIGHT | |
# trim file name | |
x=${vid##*/} | |
y=${x%.*} | |
filename=${y##*/} | |
# keeps aspect ratio |
This file contains hidden or 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
import { useMemo } from 'react' | |
import { MotionValue } from 'framer' | |
var __assign = function() { | |
__assign = | |
Object.assign || | |
function __assign(t) { | |
for (var s, i = 1, n = arguments.length; i < n; i++) { | |
s = arguments[i] | |
for (var p in s) |
This file contains hidden or 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 | |
$args = array( | |
'post_type' => 'cartoon', | |
'post_status' => 'publish', | |
'orderby' => 'date', | |
'order' => 'DESC', | |
// Using the date_query to filter posts from last 2 month |
This file contains hidden or 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 | |
$args = array( | |
'post_type' => 'cartoon', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'new_or_popular', | |
'field' => 'term_id', | |
'terms' => 110, | |
) |
This file contains hidden or 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
what happens on gist!! | |
it crashed... |
This file contains hidden or 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
/** | |
* Unset Woocommerce Shipping Address fields | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' ); | |
function custom_remove_woo_checkout_fields( $fields ) { | |
// remove billing fields | |
// unset($fields['billing']['billing_country']); |