Skip to content

Instantly share code, notes, and snippets.

View minipunch's full-sized avatar
👽

Josh Yolles minipunch

👽
  • California, USA
View GitHub Profile
CreateThread(function()
Citizen.InvokeNative(0x144da052257ae7d8, true)
print("ENABLED NETWORK ALLOW REMOTE SYNC OF LOCAL PLAYERS")
end)
function GetNearestPlayerToMe()
local players = GetActivePlayers()
local closestPlayer, closestDistance = nil, 100000
local myPos = GetEntityCoords(PlayerPedId())
local myPlayerId = PlayerId()
@szemate
szemate / package-lock-conflicts.md
Last active June 13, 2024 15:11
How to resolve package-lock.json conflicts

How to resolve package-lock.json conflicts

It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

  1. Update the master branch with the latest changes:
    git checkout master
    git pull
    
  2. Merge your feature branch into master:
@sasjo
sasjo / drain_jenkins.groovy
Last active April 8, 2024 22:09
Drain Jenkins build queue and stop all running jobs
Jenkins.instance.queue.items.findAll { !it.task.name.contains("Extenda") }.each {
println "Cancel ${it.task.name}"
Jenkins.instance.queue.cancel(it.task)
}
Jenkins.instance.items.each {
stopJobs(it)
}
def stopJobs(job) {
if (job in jenkins.branch.OrganizationFolder) {
// Git behaves well so no need to traverse it.
@michaeltreat
michaeltreat / mongodb_shell_commands.md
Last active May 22, 2024 10:37
Quick Cheat Sheet for Mongo DB Shell commands.

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@merikan
merikan / Jenkinsfile
Last active June 13, 2024 03:56
Some Jenkinsfile examples
Some Jenkinsfile examples
@IS4Code
IS4Code / entityiter.lua
Created July 14, 2017 12:47
FiveM entity iterators
--[[The MIT License (MIT)
Copyright (c) 2017 IllidanS4
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
@haskaalo
haskaalo / tarcheatsheet.md
Last active June 17, 2024 06:31
Tar usage / Tar Cheat Sheet

Tar Usage / Cheat Sheet

Compress a file or directory

e.g: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

  • -c: Create an archive.
  • -z: Compress the archive with gzip.
  • -v: makes tar talk a lot. Verbose output shows you all the files being archived and much.
  • -f: Allows you to specify the filename of the archive.
@rchrd2
rchrd2 / test-php-basic-auth.php
Last active February 1, 2024 21:18 — forked from westonruter/test-php-basic-auth.php
PHP basic auth example
<?php
function require_auth() {
$AUTH_USER = 'admin';
$AUTH_PASS = 'admin';
header('Cache-Control: no-cache, must-revalidate, max-age=0');
$has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW']));
$is_not_authenticated = (
!$has_supplied_credentials ||
$_SERVER['PHP_AUTH_USER'] != $AUTH_USER ||
$_SERVER['PHP_AUTH_PW'] != $AUTH_PASS
@pauliusdotpro
pauliusdotpro / DisableVehiclePeds.txt
Last active November 6, 2018 11:37
Disables all autospawning vehicles, peds
Citizen.CreateThread(function()
while true
do
-- These natives has to be called every frame.
SetVehicleDensityMultiplierThisFrame(0.0)
SetPedDensityMultiplierThisFrame(0.0)
SetRandomVehicleDensityMultiplierThisFrame(0.0)
SetParkedVehicleDensityMultiplierThisFrame(0.0)
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
prop_a4_pile_01
prop_a4_sheet_01
prop_a4_sheet_02
prop_a4_sheet_03
prop_a4_sheet_04
prop_a4_sheet_05
prop_abat_roller_static
prop_abat_slide
prop_acc_guitar_01
prop_acc_guitar_01_d1