Skip to content

Instantly share code, notes, and snippets.

View kapouer's full-sized avatar

Jérémy Lal kapouer

View GitHub Profile
@kapouer
kapouer / copyfail.yml
Created April 30, 2026 09:04
CopyFail Ansible Mitigation
---
- name: Disable algif_aead kernel module
hosts: all
become: true
tasks:
- name: Disable algif_aead in modprobe configuration
ansible.builtin.lineinfile:
path: /etc/modprobe.d/disable-algif.conf
line: install algif_aead /bin/false
create: true
+ abidiff debian/abi.xml debian/abi.xml.new
ELF SONAME changed
Functions changes summary: 19 Removed, 0 Changed, 59 Added functions
Variables changes summary: 0 Removed, 0 Changed, 3 Added variables
Function symbols changes summary: 0 Removed, 0 Added function symbol not referenced by debug info
Variable symbols changes summary: 1 Removed, 3 Added variable symbols not referenced by debug info
SONAME changed from 'libada.so.2' to 'libada.so.3'
19 Removed functions:
@kapouer
kapouer / nftables.conf
Created February 2, 2022 13:22
nftables sample with parity load balancer, multiple servers ip
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
iif "lo" accept
ct state established,related accept
tcp dport { 22, 44 } ct state new accept comment "ssh on default and inhouse ports"
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
iif "lo" accept
ct state established,related accept
tcp dport { 22, 44 } ct state new accept comment "ssh on default and inhouse ports"
ip daddr 212.83.181.20 tcp dport { 80, 443, 7700-7706 } accept comment "ws4.nsocket.com"
ip6 nexthdr ipv6-icmp icmpv6 type { nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert } accept comment "IPv6 connectivity"
}
const path = require('path');
const readFile = require('fs').promises.readFile;
const serveStatic = require('serve-static');
/* ES Modules path resolution for browsers */
/* uses fields in package.json (exports,module,jsnext:main,main) */
/* mount is the base path, and it needs a whitelist of modules names */
module.exports = async function(mount, whitelist = []) {
const node_path = path.join('.', 'node_modules');
const Path = require('path');
/* fix paths before nodejs-like es6 imports
* 'root' must be served by statics middleware
* 'mount' must be a path prefix to a folder e.g. /modules/
* To allow a node module 'abc' to be served through this,
* place a symlink from node_modules/abc to `${root}${mount}abc`
* (this is not automatic for security reasons)
*/
module.exports = function(root, mount) {
const objection = require('.');
const Model = objection.Model;
const expect = require('expect.js');
const knex = require('knex')({
connection: {
user: 'objection',
host: 'localhost',
database: 'objection_test'
},
client: 'postgres'
var objection = require('objection');
var ref = objection.ref;
var Model = objection.Model;
var QueryBuilder = objection.QueryBuilder;
var UpdateOperation = require(
require('path').join(
require.resolve('objection'),
'..',
'queryBuilder/operations/UpdateOperation'
#!/bin/sh
cd ../public
poFiles=../lang/*.po
destDir=langs
for poFile in ${poFiles}; do
lang=`basename -s .po ${poFile}`
rm -rf "${destDir}/${lang}"
Trace: EventTargetImpl { _eventListeners: { load: [ [Object] ] } }
at invokeInlineListeners (/home/dev/Software/github/node-webkitgtk/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:165:35)
at EventTargetImpl._dispatch (/home/dev/Software/github/node-webkitgtk/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:126:7)
at EventTargetImpl.dispatchEvent (/home/dev/Software/github/node-webkitgtk/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:91:17)
at Window.dispatchEvent (/home/dev/Software/github/node-webkitgtk/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:71:35)
at Window.process.nextTick (/home/dev/Software/github/node-webkitgtk/node_modules/jsdom/lib/jsdom/browser/Window.js:433:14)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)