Skip to content

Instantly share code, notes, and snippets.

View yannvr's full-sized avatar
💭
∞ + 1

Yann VR yannvr

💭
∞ + 1
View GitHub Profile
@yannvr
yannvr / animationKeyFrameCom.scss
Last active August 29, 2015 14:02
Compass and CSS for cross browser keyframe AND related animation
// animation.css
@include keyframes(reduce) {
0% {
width: 100%;
background-color: #828282;
}
80% {
background-color: #828282;
}
100% {
@yannvr
yannvr / compassFlexMixins
Created June 11, 2014 19:54
Cross browser Flex mixins
// ==================================================================
// Flexbox
//
// Implementation based on Chris Coyier's article:
// Using Flexbox: Mixing Old and New for the Best Browser Support || http://css-tricks.com/using-flexbox/
// ==================================================================
// Flexbox Context (applied to container element of flex items)
@mixin flex-display {
@include experimental-value(display, box, -moz, -webkit, -ms, not -khtml, official);
@yannvr
yannvr / compassUsefulPlaceholdersAndMixins.scss
Created June 11, 2014 19:55
compassUsefulPlaceholdersAndMixins
%text-shadow { text-shadow: 2px 2px 1px black; }
%clearfix {
&:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
@yannvr
yannvr / gist:5e45463f3da942d86e96
Created December 1, 2015 16:38
Iterate over localforage values
localforage.iterate(function(value, key, iterationNumber) {
// Resulting key/value pair -- this callback
// will be executed for every item in the
// database.
console.log([key, value]);
}, function(err) {
if (!err) {
console.log('Iteration has completed');
}
});
@yannvr
yannvr / view localforage keys
Created June 2, 2016 00:45
view localforage keys
localforage.keys().then((keys) => console.log(keys))
@yannvr
yannvr / wallet-observer-test.ts
Last active May 28, 2024 10:53
wallet observer tests
import { WalletCore } from "@aptos-labs/wallet-adapter-core";
import { MartianWallet } from "@martianwallet/aptos-wallet-adapter";
import { PetraWallet } from "petra-plugin-wallet-adapter";
import { connectWalletAction, disconnectWalletAction } from "@store/wallet/wallet.reducer";
import { getAptosWalletState } from "@store/wallet/wallet.utils";
import { aptosWalletCore, connectAptosWallet, injectStoreToAptosWalletConfig } from './wallet.config.aptos';
jest.mock("@aptos-labs/wallet-adapter-core");
jest.mock("@martianwallet/aptos-wallet-adapter");
jest.mock("petra-plugin-wallet-adapter");