Skip to content

Instantly share code, notes, and snippets.

View elriando's full-sized avatar
💻
I may be slow to respond.

elriando

💻
I may be slow to respond.
View GitHub Profile
@pgjean
pgjean / Macbook_Kali_Linux.md
Created January 20, 2020 03:09
How to enable macbook or macbook pro trackpad and keyboard on Kali Linux

Macbook & Kali linux

Keyboard/Touchpad/Touchbar

Since the internal keyboard and touchpad won't work until you have built and loaded the drivers, you'll need to plug in an external USB keyboard to do the initial setup and installation.

apt install dkms
git clone https://github.com/cb22/macbook12-spi-driver.git /usr/src/applespi-0.1
dkms install -m applespi -v 0.1
@mecid
mecid / Calendar.swift
Last active October 21, 2024 00:38
SwiftUI Calendar view using LazyVGrid
import SwiftUI
extension Calendar {
func generateDates(
inside interval: DateInterval,
matching components: DateComponents
) -> [Date] {
var dates: [Date] = []
dates.append(interval.start)
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State var gradientAngle: Double = 0
var colors = [
Color(UIColor.systemRed),
Color(UIColor.systemOrange),
Color(UIColor.systemYellow),
Color(UIColor.systemGreen),
@Kievkao
Kievkao / SwiftUI-ScrollView-offset.swift
Created September 9, 2020 07:09
How to get ScrollView offset in SwiftUI
struct ContentView: View {
var body: some View {
ScrollViewOffset(onOffsetChange: { (offset) in
print("New ScrollView offset: \(offset)")
}) {
VStack {
ForEach(0..<100) { index in
Text("\(index)")
}
}
@nocturn9x
nocturn9x / mizip_util.py
Last active November 8, 2024 02:19
A simple tool to tinker with MiZip Mifare tags. It can generate sector(s) decryption keys as well as modified dump files to alter a tag's balance. If you know what you're doing, you can even use this tool to transform any Mifare 1K/4K tag (and probably others using the same scheme) into a "MiZip-compatible" tag recognizable by vending machines
#!/usr/bin/env python
# Copyright 2021 Mattia Giambirtone & All Contributors
#
# 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
@fatbobman
fatbobman / dynamicHeightSheet.swift
Created April 5, 2024 06:59
a dynamic sheet demo
import SwiftUI
struct ContentView: View {
@State var show = false
@State var height: CGFloat = 250
var body: some View {
List {
Button("Pop Sheet") {
height = 250
show.toggle()