Skip to content

Instantly share code, notes, and snippets.

@zoilomora
zoilomora / README.md
Last active May 13, 2024 16:49
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@markscottwright
markscottwright / PKCS7.java
Last active March 25, 2024 12:37
How to create a PKCS7/CMS signature using BouncyCastle
package scratch;
import java.io.FileInputStream;
import java.io.IOException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Provider;
import java.security.Security;
@mshkrebtan
mshkrebtan / webex-ubuntu.md
Last active October 28, 2022 15:23
Run Cisco Webex on 64-bit Ubuntu 16.04

Run Cisco Webex on 64-bit Ubuntu 16.04

With Audio and Screen Sharing Enabled

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386
@Manouchehri
Manouchehri / rfc3161.txt
Last active May 13, 2024 09:34
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
@peterspackman
peterspackman / mingw-w64-x86_64.cmake
Last active April 15, 2024 15:04
cmake toolchain file for mingw-w64 x86_64 builds on Ubuntu
# Sample toolchain file for building for Windows from an Ubuntu Linux system.
#
# Typical usage:
# *) install cross compiler: `sudo apt-get install mingw-w64`
# *) cd build
# *) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake ..
# This is free and unencumbered software released into the public domain.
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
@kokes
kokes / cumsum.csv
Last active August 14, 2016 09:16
Víceméně kumulativní suma pro strukturální fondy EU ("evropské fondy"). SŽDC získala skoro 12 % všech prostředků, TOP 5 žadatelů získalo 28 % a prvních 50 získalo polovinu všech rozdělených peněz. Tedy každý řádek je procento peněz, které obdržel ten daný subjekt + všichni nad ním.
IČO Žadatel Smlouva Proplaceno
70994234 Správa železniční dopravní cesty, státní organizace 11.8 % 11.4 %
65993390 Ředitelství silnic a dálnic ČR 22.3 % 22.2 %
00551023 Ministerstvo práce a sociálních věcí 25.4 % 25.0 %
70890692 Moravskoslezský kraj 26.8 % 26.4 %
00005886 Dopravní podnik hl.m. Prahy ,akciová společnost 28.2 % 27.9 %
00216224 Masarykova univerzita 29.5 % 29.3 %
00007064 Ministerstvo vnitra 30.6 % 30.3 %
72496991 Úřad práce České republiky 31.5 % 31.2 %
61989592 Univerzita Palackého v Olomouci 32.4 % 32.2 %
@granella
granella / generate-certificate-chain.sh
Created June 27, 2016 11:15
Create self-signed certificate with root and ca for development
#!/bin/bash
rm *.jks 2> /dev/null
rm *.pem 2> /dev/null
echo "===================================================="
echo "Creating fake third-party chain root -> ca"
echo "===================================================="
# generate private keys (for root and ca)
@wilx
wilx / barrier.c
Last active February 1, 2016 01:28
possible reimplementation of pthread_barrier* API for Cygwin
#include <pthread.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
\documentclass[11pt]{extarticle}
\usepackage[paper=a4paper, landscape, margin=0.3in]{geometry}
\usepackage{multicol}
%\setlength\columnseprule{0.5pt}
\setlength\columnsep{2em}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}