Skip to content

Instantly share code, notes, and snippets.

View luksamuk's full-sized avatar

Lucas Vieira luksamuk

View GitHub Profile
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
data:
redis.conf: |
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
@mauri870
mauri870 / u9fs-sharing-unix-files-with-plan9.md
Last active August 4, 2022 13:48
Sharing UNIX files with a Plan9 instance through 9P

Hi,

this gist summarizes how to share UNIX files/folders with a Plan9 instance using u9fs.

First of all, grab the latest u9fs release from source or install it with the package manager of your preference, then build and install.

Please be sure to find the correct path to your u9fs binary because it may differ based on the installation, normally it is /usr/local/bin/u9fs or /usr/bin/u9fs.

On older unix/linux systems you may use inetd, which is already covered by the u9fs man page.

@caotic123
caotic123 / basic_graphs.cpp
Last active December 15, 2019 00:13
Graph datatype - Krustal and Prim Implementation
#include <iostream>
#include <functional>
#include <map>
#include <list>
#include <vector>
#include <tuple>
#include <algorithm>
struct Empyth {
enum { isEmyth = 1 };
name: transposer
source code: |-
input: '++++'
blank: ' '
start state: D
table:
'Gbb':
' ': {R: 'F'}
'+': {R: 'Gb'}
'-': {R: 'Fb'}
@amake
amake / innosetup-linux-macos.org
Last active August 19, 2024 14:06
Inno Setup on Linux and macOS

Inno Setup on Linux and macOS

Inno Setup is a popular installer builder for Windows. Of course it is made to run on Windows only, by default. But what if you want to build Windows installers off Windows, i.e. on Linux or macOS?

You’re in luck: It’s possible to run Inno Setup anywhere that Docker runs (including Linux and macOS), and even have a passable experience writing your setup script.

@caotic123
caotic123 / astar.hs
Last active May 27, 2019 13:43
8 puzzle : A* game solver
import Control.Monad
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.Map.Strict as Map
data Puzzle = Puzzle [Int] Int Int Int deriving Show
heuristic_comp :: [Int] -> Int
heuristic_comp [] = 8
heuristic_comp (x : xs) = do
@9nut
9nut / filter.rc
Created January 26, 2019 03:02
Prime Sieve - Plan 9 rc script
# prime sieve based on https://swtch.com/~rsc/talks/threads07/
# primes appear on stderr
# example:
# seq 2 100 | filter
fn filter {
p=`{read -n 1}
if (~ $status '') {
echo $p >[1=2]
x=`{read -n 1}

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@infosec-intern
infosec-intern / vscode.desktop
Last active June 24, 2024 17:26
A simple .desktop file for Visual Studio Code
[Desktop Entry]
Name=Visual Studio Code
Comment=Programming Text Editor
Exec=/usr/local/src/VSCode-linux-x64/code
Icon=/usr/local/src/VSCode-linux-x64/resources/app/resources/linux/code.png
Terminal=false
Type=Application
Categories=Programming;
@conspect
conspect / cult_of_ignorance.md
Last active May 29, 2024 19:02
A Cult Of Ignorance, Isaac Asimov

It's hard to quarrel with that ancient justification of the free press: "America's right to know." It seems almost cruel to ask, ingeniously, "America's right to know what, please? Science? Mathematics? Economics? Foreign languages?"

None of those things, of course. In fact, one might well suppose that the popular feeling is that Americans are a lot better off without any of that tripe.

There is a cult of ignorance in the United States, and there always has been. The strain of anti-intellectualism has been a constant thread winding its way throughout political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

Politicians have routinely striven to speak the language of Shakespeare and Milton as ungrammaticaly as possible in order to avoid offending their audiences by appearing to have gone to school. Thus, Adlai Stevenson, who incautiously allowed intelligence and learning and wit to peep out of his speeches, found the American people