Skip to content

Instantly share code, notes, and snippets.

View abdullah's full-sized avatar
🖖
Hello!

Abdullah abdullah

🖖
Hello!
View GitHub Profile
import { shallowMount } from '@vue/test-utils';
import AppFooter from '@/components/shared/AppFooter';
describe('AppFooter.vue', () => {
afterEach(() => {
jest.clearAllMocks();
});
describe('data', () => {
it('should have "isBackToTopVisible" as false value', () => {
@abdullah
abdullah / featured_post.dart
Last active January 29, 2020 08:21
Simple provider example
import 'package:flutter/material.dart';
import 'package:flutter_bloc/blocs/featured_post_bloc.dart';
import 'package:provider/provider.dart';
import 'package:flutter_bloc/widgets/refresh.dart';
class FeaturedPostPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final FeaturedPostBloc featuredPostBloc =
@abdullah
abdullah / gist:1b1563434a9037b2c5fffaf5518d4e91
Created August 28, 2018 08:02
extract color with regex
grep -hoEr 'src' -e '(#([0-9a-f]{3}){1,2}|(rgba|hsla)\(\d{1,3}%?(,\s?\d{1,3}%?){2},\s?(1|0|0?\.\d+)\)|(rgb|hsl)\(\d{1,3}%?(,\s?\d{1,3}%?){2}\))' | sort -t: -u -k1,1 > o.txt
@abdullah
abdullah / index.js
Created April 10, 2017 21:19
axios middleware
/* eslint-disable */
import axios from 'axios';
import TokenStorage from '@/helpers/tokenStorage';
import store from '@/store';
import router from '@/router';
import { auth } from '@/services';
axios.interceptors.request.use(
config => {
const token = TokenStorage.get();
@abdullah
abdullah / index.js
Created April 10, 2017 16:26
Auth actions with vuex and axios
/* eslint-disable */
import axios from 'axios';
import TokenStorage from '@/helpers/tokenStorage';
import store from '@/store';
import router from '@/router';
axios.interceptors.request.use(
config => {
const token = TokenStorage.get();
if (token) {
@abdullah
abdullah / selend.js
Last active April 30, 2024 11:00
Selection End Event
let selectionEndTimeout = null,
event = new Event('selectionEnd');
document.addEventListener('selectionEnd', function (evt/*event*/) {
console.log("End selection!")
}, false);
[
"mouseup",
/*
BODEV Office
1 July 2016
@author : Abdullah mara
Bu script 1 Temmuz 2016'da bodevoffice developer'larının langırt turnuvasındaki takımları
belirlemek için yazılmıştır
*/