Skip to content

Instantly share code, notes, and snippets.

@florina-muntenescu
florina-muntenescu / Data.kt
Last active April 16, 2024 19:48
Using RoomDatabase#Callback to pre-populate the database - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@christoofar
christoofar / main.md
Last active April 16, 2024 19:46
Wrapping a C library call in a defensive Go routine
This study focuses on the strategies used by the "xz backdoor", an extremely
complex piece of malware that contains its own x64 disassembler inside of it 
to find critical locations in your code and hijacks it by swapping out your 
code with its own as it runs.  Because this a machine-code based attack,
all code written in any program language can be attacked and is vulnerable.

Instead of targeting sshd directly, the xz 
backdoor injects itself in the parent systemd process then hijacks the 
GNU Dynamic Linker (ld), before sshd is even started or libcrypto.so is 
nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs:
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 16, 2024 19:42
set -e, -u, -o, -x pipefail explanation
@TheCyberQuake
TheCyberQuake / TwitchTvEmbedOnlyWhenLive.html
Last active April 16, 2024 19:39 — forked from capperstrnd/TwitchTvEmbedOnlyWhenLive.html
A simple script for embedding Twitch stream only when the channel is live, otherwise it is hidden.
<html>
<head>
<style>
.hide { display:none; }
/* Optional: The following css just makes sure the twitch video stays responsive */
#twitch {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
@zpv
zpv / knowledge.md
Created June 7, 2019 05:14
Best Websites to Learn Ethical Hacking

Cybrary

Cybrary is a completely FREE online cybersecurity training website. Here you can Learn, contribute and join the only free and open source ethical hacking training community online. It provides training for most complicated topics of the IT sector. It is supported by a community of people to provide free up-to-date lessons and learning materials. Cybrary also provides the chance to connect with businesses in the ITsec industry.

Hack This Site

Hack This Site is a free, safe and legal training platform for hackers to test their hacking skills. The website has a vast selection of hacking articles. It also has a huge forum where users can discuss hacking and security. It’s an active community with many active projects in development. You’ll find a lot of new challenges and missions on the homepage including:

  • Basic missions
  • Realistic missions
@dsmrt
dsmrt / my-command.ts
Last active April 16, 2024 19:36
Yargs Typescript CommandModule Generics
import { CommandModule, Argv, Options, ArgumentsCamelCase } from 'yargs'
export interface MyOptions extends Options {
interactive: boolean
env: string
color: string
}
export class MyCommand<U extends MyOptions> implements CommandModule<{}, U> {
public command = 'my-cmd'
@valiant-code
valiant-code / IronMon-Rules.md
Last active April 16, 2024 19:35
IronMon Rules

The IronMON Challenge

The IronMon challenge is a Pokémon Randomizer Challenge run created by Iateyourpie. Designed to make experiencing the randomizer fun and challenging, while taking away the wild Pokémon grind that come with some other challenges. It was originally made for Fire Red / Leaf Green but the rules can be applied/adjusted for other games as well. If you're interested to find out more about IronMon, join our Discord community!

IronMon has varying levels of difficulties, to keep it more approachable but also provide the toughest challenge possible for those who want it.