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
@mixin for-phone-only { | |
@media (max-width: 599px) { @content; } | |
} | |
@mixin for-tablet-portrait-up { | |
@media (min-width: 600px) { @content; } | |
} | |
@mixin for-tablet-landscape-up { | |
@media (min-width: 900px) { @content; } | |
} | |
@mixin for-desktop-up { |
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
function try() { | |
if (!$("#element").size()) { | |
window.requestAnimationFrame(try); | |
}else { | |
$("#element").do_some_stuff(); | |
} | |
}; |
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
(function () { | |
if (typeof window.R === 'undefined') { | |
var s = document.createElement('script'); | |
s.setAttribute('src', 'https://cdnjs.cloudflare.com/ajax/libs/ramda/0.17.1/ramda.min.js'); | |
document.body.appendChild(s); | |
} | |
}()); |
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
deploy: | |
script: | |
- apt-get update -qq && apt-get install -y -qq lftp | |
- lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -Rnev --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/" | |
only: | |
- master |
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
import axios from 'axios'; | |
import { useState, useEffect } from 'react'; | |
function useCharacterForm() { | |
const [loading, setLoading] = useState(false); | |
const [characters, setCharacters] = useState(null); | |
const [error, setError] = useState(null); | |
useEffect(() => { |
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
import React, { useState } from 'react'; | |
import Loader from 'react-spinners/PacmanLoader'; | |
import useCharacterForm from './hooks/useGetCharacters'; | |
import usePagination from './hooks/usePagination'; | |
const CharacterForm = () => { | |
const [selectedCharacter, setSelectedCharater] = useState(null); | |
const { characters, loading, error } = useCharacterForm(); |
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
import { useState } from 'react'; | |
function usePagination() { | |
const [page, setPage] = useState(1); | |
const nextPage = () => setPage(page + 1); | |
const prevPage = () => setPage(page - 1); | |
return { page, setters: { prevPage, nextPage } }; | |
} |
OlderNewer