git
discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
local random = math.random | |
local function uuid() | |
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | |
return string.gsub(template, '[xy]', function (c) | |
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb) | |
return string.format('%x', v) | |
end) | |
end |
git
discard all local changes/commits and pull from upstream
git reset --hard origin/master
git pull origin master
# Outbound UDP Flood protection in a user defined chain. | |
iptables -N udp-flood | |
iptables -A OUTPUT -p udp -j udp-flood | |
iptables -A udp-flood -p udp -m limit --limit 50/s -j RETURN | |
iptables -A udp-flood -j LOG --log-level 4 --log-prefix 'UDP-flood attempt: ' | |
iptables -A udp-flood -j DROP |
var couchUrl = "foobar"; | |
$.getJSON(couch-url + "view-name-here", function(data) { | |
data.rows.forEach(function (doc) { | |
$.ajax({ | |
url: couch-url + doc.value._id + '?rev=' + doc.value._rev, | |
type: 'DELETE', | |
success: function(result) { | |
console.log("Deleted document with id " + doc.value._id); | |
} | |
}); |
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
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 |
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) | |
<?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 |
e.g: tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
--[[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 |