Skip to content

Instantly share code, notes, and snippets.

@timelf123
timelf123 / beguidcalc.md
Created August 1, 2017 17:10 — forked from klemmchr/beguidcalc.md
ArmA 3 / DayZ-Standalone - BattlEye GUID calculation

md5("BE" (2 bytes) + 64-bit SteamID (8 bytes))

@timelf123
timelf123 / multiple_ssh_setting.md
Last active June 21, 2017 19:39 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"

What if a package did something like this, but instead of logging to the console, they sent it back to a server?

Have you actually reviewed every dependency and every child dependency in every app you deploy?

Why are people not more scared of this?

Analytics

@timelf123
timelf123 / 144
Created May 17, 2017 18:27 — forked from akyoto/144
Ubuntu + Nvidia + 144 Hz monitor
# Put this in your startup scripts
xrandr --output DVI-D-0 --mode 1920x1080 --rate 144
# In order to find the correct parameters for the above command run:
xrandr -q
HOST=http://radarr.local:7878
API_KEY= # Settings > General
ids=$(curl --silent $HOST/api/movie -X GET -H "X-Api-Key: $API_KEY" \
| jq '.[] | select(.monitored == false) | .id')
for id in $ids; do
echo "Deleting movie id $id"
curl --silent $HOST/api/movie/$id -X DELETE -H "X-Api-Key: $API_KEY"
done
@timelf123
timelf123 / mirror_remote_directory_to_local_directory
Created April 10, 2017 21:05 — forked from pixeline/mirror_remote_directory_to_local_directory
Bash script using lftp to mirror remote directory to local directory, thus keeping the local directory synchronized with the remote one.
#!/bin/sh
# @author: Alexandre Plennevaux
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY
@timelf123
timelf123 / guide.md
Created March 9, 2017 04:12 — forked from airtonix/guide.md
Guide: AdminToolkit for Arma3 ExileMod

Info

Server:

  • Boot2Docker Host:
    • Game Server: A Ubuntu 14.10 docker image based off houki/arma3
    • Database Server: official mariadb docker image

Client:

@timelf123
timelf123 / authInterceptor.js
Created February 23, 2017 21:02 — forked from bettysteger/authInterceptor.js
Set specific http headers on every http request from cookies (angular)
'use strict';
/**
* Authentication with token and email for every server request. (Sets HTTP headers)
*
* This interceptor shows the error from the server (i18n key).
* Also sets global error variable if the request fails and redirects the user to '/' when he is not authorized.
* @see http://engineering.talis.com/articles/client-side-error-logging/
*/
app.factory('authInterceptor', function ($rootScope, $q, $cookies, $location, $timeout) {
@timelf123
timelf123 / SimpleStore.js
Created February 20, 2017 20:21
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
app.directive('faFastScroll', ['$parse', function ($parse) {
var Interval = function(min, max) {
this.min = min || 0;
this.max = max || 0;
};
Interval.prototype.clip = function(min, max) {
if(this.max <= min || this.min >= max) {
this.min = this.max = 0;