Skip to content

Instantly share code, notes, and snippets.

@itsoli
itsoli / nftables.conf
Last active January 19, 2023 14:43
nftables vpn config
#!/usr/bin/nft -f
define ext_if = ens3
define ext_ip = a.b.c.d
define vpn_if = ppp0
define vpn_ip = x.y.z.w/s
table inet filter {
chain input {
type filter hook input priority 0;
@itsoli
itsoli / .lldbinit
Created October 6, 2015 08:43
lldb data formatter
type summary add glm::vec2 --summary-string "x=${var.x}, y=${var.y}"
type summary add glm::vec3 --summary-string "x=${var.x}, y=${var.y}, z=${var.z}"
type summary add glm::vec4 --summary-string "x=${var.x}, y=${var.y}, z=${var.z}, w=${var.w}"
type summary add glm::quat --summary-string "x=${var.x}, y=${var.y}, z=${var.z}, w=${var.w}"
type summary add glm::mat2 --summary-string "${var.value[0].x}, ${var.value[0].y} | ${var.value[1].x}, ${var.value[1].y}"
type summary add glm::mat3 --summary-string "${var.value[0].x}, ${var.value[0].y}, ${var.value[0].z} | ${var.value[1].x}, ${var.value[1].y}, ${var.value[1].z} | ${var.value[2].x}, ${var.value[2].y}, ${var.value[2].z}"
type summary add glm::mat4 --summary-string "${var.value[0].x}, ${var.value[0].y}, ${var.value[0].z}, ${var.value[0].w} | ${var.value[1].x}, ${var.value[1].y}, ${var.value[1].z}, ${var.value[1].w} | ${var.value[2].x}, ${var.value[2].y}, ${var.value[2].z}, ${var.value[2].w} | ${var.value[3].x}, ${var.value[3].y}, ${var.value[3].z}, ${var.value[3].
function setCssTransition(target, property, duration, animation, delay) {
if (!target || !property || (property === 'none')) {
return;
}
if (target instanceof jQuery) {
target = target.get(0);
}
var transitionJs = css3prop.js('transition');
var value;
if (property === 'all') {
var css3prop = (function () {
'use strict';
function dashedToCamelCase(string) {
return string.replace(/(\-[a-z])/g, function($1) {
return $1.charAt(1).toUpperCase();
});
}
function camelCaseToDashed(string) {
return string.replace(/([A-Z])/g, function($1) {
@itsoli
itsoli / log.js
Last active August 29, 2015 14:02
var log = (function() {
'use strict';
var log = {};
log.Level = function (level, name) {
this.level = level;
this.name = name;
};