Skip to content

Instantly share code, notes, and snippets.

View d0p3t's full-sized avatar
❤️
be nice

Remco d0p3t

❤️
be nice
View GitHub Profile
@nbrochu
nbrochu / browser.py
Last active June 9, 2019 17:13
Python Pseudo-Electron Boilerplate (Windows)
import os
import sys
import math
import time
import threading
import webbrowser # To launch the remote debugging page
import win32api #
import win32con # pip install pywin32
import win32gui #
@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

JavaScript, the weird parts

link to notes https://git.io/vgpKc

about Sher Minn

  • front-end web engineer
  • funemployed, but joining Viki.com in a week
  • recently spent 3 months in NYC at the Recurse Center
    • retreat for programmers
  • where people go to be better at what they do

Scaleform: mp_car_stats_01

Scale

Citizen.CreateThread(function()
    function Initialize(scaleform)
        scaleform = RequestScaleformMovie(scaleform)
        while not HasScaleformMovieLoaded(scaleform) do
            Citizen.Wait(0)
        end
        PushScaleformMovieFunction(scaleform, "SET_VEHICLE_INFOR_AND_STATS")
@glebcha
glebcha / curved_polylines.js
Created September 17, 2014 08:01
Google Maps curved polylines
/*
Simple jQuery Curved Line Plugin for use with Google Maps Api
author: Daniel Nanovski
modifications: Coen de Jong
version: 0.0.2 (Beta)
website: http://curved_lines.overfx.net/
License:
@throwarray
throwarray / mugroom.lua
Created July 21, 2018 19:09
mugroom.lua
local function CreateNamedRenderTargetForModel(name, model)
local handle = 0
if not IsNamedRendertargetRegistered(name) then
RegisterNamedRendertarget(name, 0)
end
if not IsNamedRendertargetLinked(model) then
LinkNamedRendertarget(model)
end
if IsNamedRendertargetRegistered(name) then
handle = GetNamedRendertargetRenderId(name)
@manchot0
manchot0 / gist:354c2df17ec4afd1ffae9642bf2273cc
Last active February 1, 2024 18:08
DDOS protection with iptable
IPtables DDOS protection :
In my config i assume the server is not a router and already profit from some filtering by the hosting company on shitty
networks.
I have tested this on ubuntu server 18.04 with the kernel 4.15.0-36-generic.
Protect from malformed packet, ACK FIN RST attack and SYN-flood.
Flood which profit of TCP-KEEPALIVE (so there a no SYN packet) should be handled by the web server (rate-limit in nginx for
exemple). Connlimit can also be helpfull to limit the number of connexion per ip.
@ruyadorno
ruyadorno / osx_setup.md
Last active March 12, 2024 03:23 — forked from millermedeiros/osx_setup.md
Guide for setting up a new osx

Setup Mac OS X

This is just a personal script to help me remember all the steps required to setup a new osx machine in their correct order. I do not advise you to follow this guide if you don't know what you're doing.

Setup

0. Setup iCloud

@ravibhure
ravibhure / git_rebase.md
Last active April 3, 2024 08:38
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: