10-10 update

This commit is contained in:
Tyler Perkins 2021-10-10 23:22:53 -04:00
parent 094f29de24
commit f7ff13df5e
52 changed files with 1047 additions and 14 deletions

Binary file not shown.

View File

@ -21,7 +21,10 @@ _Ideas.md and Classes.md are encrypted, so these links will not work_
* [[tech/databases|Databases & SQL]] - Databases and SQL
* [[tech/os|Operating Systems Design]] - Basic building blocks of an OS
* [[tech/embedded|Embedded Programming]] - Embedded Systems like arduinos and (kinda) pi's
* [[electronics|Digital and Analog]] - Digital and analog electronics
* [[tech/electronics|Digital and Analog]] - Digital and analog electronics
* [[tech/unix|Unix]] - Gentoo and other unix systems
* [[tech/3D_printing|3D Printing]] - Print objects from plastic
* [[tech/android|Android]]
* [[tech/misc|Misc]] - Miscellaneous tools
== [[lang/index|Languages]] ==
@ -44,6 +47,7 @@ _Ideas.md and Classes.md are encrypted, so these links will not work_
* [[sci/chemistry|Chemistry]]
* [[sci/physics|Physics]]
* [[sci/biology|Biology]]
* [[sci/chemicals/index|Chemicals]]
== [[botany/index|Botany]] ==
@ -51,6 +55,8 @@ _Ideas.md and Classes.md are encrypted, so these links will not work_
* [[botany/hydroponics|Hydroponics]]
* [[botany/aquaponics|Aquaponics]]
== Cooking ==
== Local to GentooBox ==
=== School ===

View File

@ -98,4 +98,20 @@ ${FOO//from/to} #replace all instances of from with to
${#FOO} #length of foo
}}}
== Common tasks ==
Rename push all .png files through convert
{{{
for file in *.png; do
convert $$file "$${file%.png}.eps"
done
}}}
[[index]]

View File

@ -6,6 +6,16 @@ Systems language. One of the fastest langs around
* [[bithacks]] - Wacky was to break memory
== stdlib ==
standard library functions
* man atoi
- string to int
* man strtol
- string to long
* man fgets
- get string from file
== Also See ==

13
lang/Python.wiki Normal file
View File

@ -0,0 +1,13 @@
= Python =
Wonderful little scripting language
== Libraries ==
== Built ins ==
=== Map ===
takes a function (can be a lambda) and an iterator to perform the function upon
[[index]]

View File

@ -14,7 +14,10 @@
* [[Rust|Rust]]
* [[Go|Go]]
* [[sql|SQL]]
* [[x86|x86]]
== Also see ==
* [[../tech/index]]
[[../index]]

View File

@ -1,7 +1,8 @@
= Acids =
Any substance that releases H^+ ion in aqueous [[solution]], aka H is first in
chemical formula
chemical formula.
Hydrogen released by acids are called hydronium ions
* HCL
* HCL + H,,2,,O => H,,3,,O^+ + Cl^-
@ -9,8 +10,24 @@ chemical formula
== Common Acids ==
* HF,,(g),, - hydrogen fluoride
* HF,,(aq),, - hydofluoric acid
* HF,,(aq),, - hydrofluoric acid
* HCl,,(g),, - hydrogen chloride
* HCl,,(aq),, - hydrocloric acid
* HCl,,(aq),, - hydrochloric acid
* citric acid
* ascorbic acid
* lactic acid
== Common characteristics ==
* Taste sour
* turn litmus paper red
* react with metal to release hydrogen
== Also see ==
* [[bases]]
* [[salts]]
* [[pH]]
* [[bronsted-lowry]]
[[index]]

View File

@ -1,7 +1,25 @@
= Bases =
Any substance that releases OH^- ion in aqueous solution, *bonds with a metal*
The OH is referred to as hydroxide ion
* NaOH + H,,2,,O => Na^+ OH^-
== Common bases ==
* NaOH (lye)
* Ammonia (NH,,3,,)
== Common Characteristics ==
* Taste bitter
* turn litmus paper blue and feel slippery
== Also see ==
* [[acids]]
* [[salts]]
* [[pH]]
* [[bronsted-lowry]]
[[index]]

25
sci/bronsted-lowry.wiki Normal file
View File

@ -0,0 +1,25 @@
= Bronsted-Lowry =
A definitions of acids and bases that describes an acid as a compound that is
capable of donating a proton (H+) to form the hydronium ion (H,,3O^+) in aq
solution. Weak acids are partially ionized
== How to identify ==
* Strong Acid
- All solute it ionized
- One of the ions is hydronium
* Weak Acid
- Some of solute is ionized
- One of the ions is hydronium
* Non acid
- Any amount is ionized
- No hydronium is formed
== Also see ==
* [[acids]]
* [[salts]]
* [[pH]]
[[index]]

13
sci/chemicals/NCl3.wiki Normal file
View File

@ -0,0 +1,13 @@
= NCL3 =
Nitrogen tri-chloride, one of the most finicky explosives, aka touch powder.
NOTE reacts with plastic, be sure to use teflon paper
== How to make ==
Requires an oxidizing source of chlorine, and source of nitorgen like Urea
Can be made using [[TCCA]] and [[amonia]]
[[index]]

14
sci/chemicals/index.wiki Normal file
View File

@ -0,0 +1,14 @@
= Chemicals =
A list of chemicals that are interseting
== General ==
* [[peroxide]]
== Dangerous ==
* [[NCl3]]
[[../index]]

View File

@ -0,0 +1,6 @@
= Peroxide =
A peroxide is any chemical in which two oxygen atoms are linked together by a
single covalent bond.
[[index]]

View File

@ -10,5 +10,4 @@ Took chemistry I Fall 2021. These are those notes
* [[reactions|Reactions]]
[[index]]

29
sci/electrolytes.wiki Normal file
View File

@ -0,0 +1,29 @@
= Electrolytes =
* Electrolytes
- Any substance that conducts electricity when disolved into water
* Non-electrolytes
- Any substance that does not conduct when dissolved in water
If ions are not formed, the compound is not an electrolyte.
* [[salts]]
- MetalAnion = Metal^+ + Anion^-
* [[acids]]
- HAnion = H + Anion^-
* [[bases]]
- MOH = Metal + OH^-
== Strong and weak electrolytes ==
* Most salts of alkali and alkali earth metals are strong electrolytes
* Most acids are weak electrolytes
* Hydroxides (OH) of alkali metals are strong [[bases]]
* Molecular substances (non metals bounded with non-metals) are
non-electrolytes
== Also see ==
[[solution]]
[[index]]

View File

@ -6,6 +6,8 @@ Notes on how all of it works, from school or from simulating it
* [[chemistry|Chemistry]]
* [[physics|Physics]]
* [[biology|Biology]]
* [[chemicals/index|Chemicals]]
[[../index]]

24
sci/ionic_equations.wiki Normal file
View File

@ -0,0 +1,24 @@
= Ionic Equations =
Chemical equations that show each substance as it exists in a [[solution]]
* Unionized equation
- Compounds in the equation are written in molecular or normal form
* Total ionic equation
- Compounds written in ionic form or true form in solution
* Net ionic equation
- Only the species that are involed in the reaction are shown
* Spectator ions
- Ions not directly involved in the reaction, yet are still present
== Rules for writing euqations ==
1) Ionic compounds (acids bases and salts) that are shown as (aq) are written
in ionic form
2) Covalent compunds are free eleemnts are never written in ionic form
3) Net ionic equations only show substances undergoing change
4) Equations must be balanced
== Also see ==
[[solution]]

View File

@ -31,5 +31,26 @@ Naming compounds of ions
* Name = cation + anion
- MgO = magnesium oxide
- Fe,,2,,(CO,,3,,),,3,, = iron(III)carbonate ferric carbonate
== Naming acids ==
See [[acids]]
* Named based on anion attached to the hydrogen
* When binary acid (one ion with hydrogen)
- Prefix -hydro
- first syllable of anion
- suffic -ic
* Complex acids have Oxygen in them
* Acid with polyatomic ion (OH), (NO,,3,,)
- replace -ate with -ic
* Polyatomic with one extra oxygen (compared to typical polyatomic ion)
- prefix per-
- suffic -ic
* Polyatomic ions with one fewer oxygen (compared to typical)
- suffix -ous
* Polyatmoic ions with two fewer oxygen
- prefix hypo-
- suffix -ous
[[index]]

8
sci/pH.wiki Normal file
View File

@ -0,0 +1,8 @@
= pH =
Measure how basic or acidic solution is, based on number of H,,3,,O on
logarithmic scale.
Values range from 0 to 14
pH = -log(H,,3,,O)

View File

@ -2,4 +2,18 @@
The interaction between 2+ substances
== [[solution|Solutions]] ==
A substance suspended in another (usually water)
see [[solution|Solutions]]
== [[electrolytes|Electrolytes]] ==
see [[electrolytes|Electrolytes]]
== Ionic Equations ==
see [[ionic_equations|Ionic Equations]]
[[index]]

View File

@ -6,4 +6,10 @@ To neutralize is to react and acid and base
* HCl,,(aq),, + NaOH => NaCl + H,,2,,O
== Also see ==
* [[bases]]
* [[salts]]
* [[pH]]
[[index]]

View File

@ -9,6 +9,15 @@ A substance suspended in a liquid
When suspended, molecule is surrounded by solvent
* Saturated
- A solution containing the max amount of dissolved solute at a given temp
* Unsaturated
- A solution containing less than the max amount of dissolved solute at a
given temp
* Supersaturated
- Solution containing more than the max amount of dissolved solute at given
temp. In a non equilibrium situation.
== Measuring ==
Molarity is moles_solute/liters_solution
@ -17,4 +26,86 @@ This is a ratio
Dilution reduces this ratio
== Dissolution Process ==
When a solute dissolved into a solvent
Can be interaction of any two states of matter (except plasma)
* Solute-Solute
- interactions are broken
- Endothermic
* Solvent-Solvent
- interactions are broken
- Endothermic
* Solvent-Solute
- interactions are formed
- exothermic
The oposite charge of the water molecule pulls molecules of other molecules off
of structure and into the solution. Works with ionic compounds ie NaCl
== Solubility ==
A quantitative term that describes the max amount of a substance that will
dissolve in a given amount of solvent. Usually in g/100mL
* sucrose
- 204g/100mL
* AgCl
- 9 x 10^-5 g/100mL
* Micsible
- Liquids that are mutuall soluble in all proportions
* Immiscible
- Liquids that are mutually insoluble
Nature of solute and solvent, ie _likes disolve likes_
Temperature increases in solids/liquids means incresed solubility, due to
increase in solute-solvent interactions
For gasses the opposite is true. For gasses, as pressure increases, so does
solubility. *Henry's Law*
=== Guidlines for water ===
* Compounds with Group I ions (NH,,4,, , NO,,3,,) are *always soluble in water*
* Compounds containing
- Cl, Br, I
- Unless in soln with Ag, Cu, Hg^2 and Pb^2
- SO,,4,,^2
- Unless in soln with Ba Ca Hg^2 Pb^2 and Sr^2
^ Above are always soluble in water
Insoluble
* OH^-
- Except with Alkali metals and ammonium
* S^2-
- Except with Barium, strontium, magnesium, sodium, potasium, and ammonium
* Carbonates, oxalates, chromates, and phostates
- Except with Alkali metals and ammonium
== Hydrates ==
Compounds that have water molecules imbedded into their structure. Amount of
water is inidicated with latin prefixes.
Named via prefix + hydrate
== Concentration ==
* Concentration
- A quantitative expression of the amount of solute dissolved into a solvent
* Concentrated solution
- A solution of high concentration
* Dilute solution
- Solution of low concentration
== [[electrolytes|Electrolytes]] ==
see [[electrolytes|Electrolytes]]
[[index]]

6
tech/3D_printing.wiki Normal file
View File

@ -0,0 +1,6 @@
= 3D Printing =
3D printers can make stuff from raw spools of plastic
[[index]]

7
tech/K-map.wiki Normal file
View File

@ -0,0 +1,7 @@
= K-map =
K-maps are ways of simplifying boolean expressions.
They are usually created from the sum of min values, graphed out into a grid
[[index]]

View File

@ -39,5 +39,12 @@ Different ways to store and operate on data, with differing efficiency
* [[greedy_algorithm|Greedy Algorithms]]
* [[brute_force|Brute Force]]
* [[randomized_algorithm|Randomized Algorithms]]
* [[genetic|Genetic Algorithms]]
* [[swarm|Swarm Inteligence]]
* [[neural|Neural Networks]]
== Common operations ==
* [[gcd]] - Find the GCD of two numbers
[[index]]

23
tech/android.wiki Normal file
View File

@ -0,0 +1,23 @@
= Android =
A mobile operating system for phones and tablets
== Tools ==
* adb
== Tasks ==
=== Data recovery ===
How to get the data off of an android phone
1) Have adb installed on the host system
2) Have MTF installed on the host system
3) Enable USB Debugging on the device
4) adb devices
- Keep changing the USB mode till the device shows up in the list that is
shown
5) adb shell
- This drops you into a bash-like shell on the device
6)

View File

@ -11,12 +11,14 @@ see [[arduino_techniques|Programming Techniques]]
* 2Kbytes SRAM
* 32Kbytes flash
* 1Kbytes EEPROM
* Three on board LED's
* 20 IO pins
* Three on board LED's * 20 IO pins
* 6 PWM and 6 ADC
== Notes ==
* WHEN UPLOADING BE SURE TO SET BOARD TO ATMEGA328OLD
- this is the atmega328old for BOARD_SUB in the makefile
=== Memory ===
* AVR instructions are 16 or 32bits wide, therefore the flash is 16K x 16
@ -36,6 +38,11 @@ see [[arduino_techniques|Programming Techniques]]
=== Pins ===
Pins are controller by the atmega's ports. Each port has different port
registers. Each bit of the 8 bit register controls a single pin. Port D
controls pins 0 through 7, C controls the analog pins, and B controls 8 through
13
* PortC
- Port C data regiser
- 0x28
@ -65,4 +72,9 @@ Same pattern:
* PortD
- 0x2B - 0x29
=== Interrupts ===
Interrupts are the same as OS typical interrupts, controlled by the Interrupt
lookup table. On this device the ILT is instead a control register.
[[embedded]]

24
tech/binary_tree.wiki Normal file
View File

@ -0,0 +1,24 @@
= Binary tree =
A branching data structure that is pointer heaven. Traversal is very fun
== Good For ==
* Finding data in log(n) time
* Organizing tiered data
== Bad For ==
* Cache Hits
== Common operations ==
=== Level Order Traversal ===
To traverse a tree level by level it requires a queue to keep track of what is
next to traverse. To do this we first push the all child nodes onto the queue.
We then visit each element in the node and push on its children into the queue.
We do this for every element till we have no elements in the queue. When this
happens, we have traversed the entire tree level by level.
[[algorithms]]

46
tech/cross_toolchain.wiki Normal file
View File

@ -0,0 +1,46 @@
= Cross Toolchain =
Setting up the tool chain involves getting a compiler for a different
architechure compiled on your machine. With gentoo its pretty straight forward,
and thats what this are instructions for. This example uses avr, but can be
subsititued for arm if needbe
== Cross-compiler toolchain ==
Here is how to get the cross compiler toolchain setup, at least on gentoo
1) emerge sys-devel/crossdev
- Gentoo package for crossdev tools
2) mkdir -p /var/db/repos/portage-crossdev/{profiles,metadata} && echo 'crossdev'
> /var/db/repos/portage-crossdev/profiles/repo_name && echo 'masters =
gentoo' > /var/db/repos/portage-crossdev/metadata/layout.conf && chown -R
portage:portage /var/db/repos/portage-crossdev
- All of this sets up a local portage repo, for compiling tools for other
systems
3) have portage and crossdev use this new repo \
{{{
#/etc/portage/repos.conf/crossdev.conf
[crossdev]
location = /var/db/repos/portage-crossdev
priority = 10
masters = gentoo
auto-sync = no
}}}
- This tells portage about crossdev and that packages can be in it, but not
to try and update them with out our permission
4) Add the following to a new file
{{{
#/etc/portage/profile/package.use.force/avr-STRING_HERE
cross-avr/gcc -pie -pic
}}}
5) crossdev -s4 --stable --portage --verbose --target avr
- s4 means to build everything from binutils to a full compiler
- stable means to use latest stable versions
- portage tells what flas to pass to emerge
- target specifies our target, the avr arch.
- *For arm specificy arm, this also includes other things like pis*
6) If any errors are thrown, follow them and try again. Common errors include
- make package.mask a directory
[[index]]

View File

@ -7,13 +7,13 @@
* [[libcurl|Libcurl]] - Curl the tool, but the API
* [[periodictable|Periodic Table]] - Python periodic table
== Tools ==
* [[gcc|GCC]] - Gnu compiler
* [[cgdb]] - Vim like front end for the GNU Debugger
* [[make|Make]] - Automate compiling
* [[vim]] - Text editor
* [[qemu]] - Virtual machine

View File

@ -3,13 +3,19 @@
Both digital and analog components
= Combinational =
== Combinational ==
* [[multiplexer|Multiplexer]]
= Sequential =
== Sequential ==
* [[buffer|Buffer]]
== Theoretical ==
* [[K-map]]
[[index]]

View File

@ -8,17 +8,26 @@ user, sometimes so that they don't even know there is a computer
* https://www.microchip.com/en-us/product/ATmega328
* [[RISC]] Processor type
== Raspberry pi ==
* https://datasheets.raspberrypi.org/rpi4/raspberry-pi-4-datasheet.pdf
- Pi 4 Model B
* https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf
- Pi Pico
* [[ARM]] Processor type
=== Line of products ===
* [[arduino_nano|Arduino Nano]]
* [[arduino_uno|Arduino Uno]]
* [[raspberry_pi|Raspberry Pi]]
* [[rapsberry_pi_pico|Raspberry Pi Pico]]
=== Programming ===
* [[../lang/C|C]]
* [[../lang/C++|C++]]
* [[arduino_techniques|Techniques]]
* [[cross_toolchain|Arduino Cross-Toolchain setup]]
[[index]]

22
tech/ffmpeg.wiki Normal file
View File

@ -0,0 +1,22 @@
= FFmpeg =
Command line tool for working with video
This is just a collection of common tasks
== Rencode as another video ==
{{{
ffmpeg -i in.mkv out.mp4
}}}
== Export clip from video ==
This will grab a clip starting at 30s that lasts for 10s
All timestamps must be of format HH:MM:SS.xxx
{{{
ffmpeg -i in.mp4 -ss 00:00:30.0 -c copy -t 00:00:10.0 out.mp4
}}}
[[index]]

16
tech/gcd.wiki Normal file
View File

@ -0,0 +1,16 @@
= GCD =
Greatest common divisor is the multiple that two numbers have in common
== Extended Euclidean's Algorihtm ==
Way to find the greatest common divisor of two numbers
* Theorm
- If m,n are relatively prime then n has an inverse mod m
* n^-1 = b mod m
- Where a,b are any integer solutions to
* a * m = b * n = 1 mod m
- and b would be a modular inverse of n
[[index]]

View File

@ -0,0 +1,61 @@
= Gentoo Cheat Sheet =
Some common operations you need to do to administer a gentoo machine
== Sync methods ==
{{{
#sync main gentoo repo
emerge --sync
#sync overlays managed with layman
layman -S
}}}
== Managing packages ==
{{{
#install and allow to be managed by portage
emerge www-client/firefox
#install without adding to world file
emerge --oneshot www-client/firefox
#remove a package
emerge --deselect www-client/firefox
#actually clean up no longer installed packages
emerge --depclean
#update entire system
emerge --ask --verbose --update --changed-use --deep @world
#apply --autounmask changes
dispatch-conf
}}}
== Troubleshooting ==
{{{
#check for missing libraries and rebuild them
revdep-rebuild -v
#check which packages depend on the given package
#ie what does firefox depend on?
equery d www-client/firefox
}}}
== Use flags ==
Use flags are kept in /etc/portage/package.use/
== Overlays ==
{{{
#list all existing overlays
layman -L
#list installed overlays
layman -l
#add an overlay
layman -a OVERLAY
}}}
[[index]]

View File

@ -6,7 +6,7 @@ flavors.
== Good For ==
* Crazy fast [[look]] ups
* Crazy fast look ups
== Bad for ==

16
tech/imagemagick.wiki Normal file
View File

@ -0,0 +1,16 @@
= Imagemagick =
Tools for conveting images on the command line
This is just a list of random stuff you can do using it
== Make a gif ==
{{{
#make a gif out of images
convert IMG.png IMG2.png ... -delay DELAY -loop 0 out.gif
#make a gif that quickly changes images
convert IMG.png IMT2.png ... -loop 1 out.gif
}}}
[[index]]

View File

@ -10,6 +10,13 @@ Everything dealing with my awful addiction to computers
* [[os|Operating Systems Design]] - Basic building blocks of an OS
* [[embedded|Embedded Programming]] - Embedded Systems like arduinos and (kinda) pi's
* [[electronics|Digital and Analog]] - Digital and analog electronics
* [[unix|Unix]] - Gentoo and other unix systems
* [[3D_printing|3D Printing]] - Print objects from plastic
* [[android|Android]]
* [[misc|Misc]] - Miscellaneous tools
== Also see ==
* [[../lang/index]]
[[../index]]

85
tech/kernel.wiki Normal file
View File

@ -0,0 +1,85 @@
= Linux kernel =
The part actually called Linux. Some stuff on compiling for it and things it
provides
== Proc ==
/proc is a virtual filesystem provided by the kernel that has info on processes
running and some basic system info. Here are some useful things from it.
* meminfo
- info about ram usage
* acpi/*
- info about things that control power (such as laptop lid, power button, etc)
* sys/kernel/*
- info about the status of the kernel
* crypto
- encryption algorithms built into the kernel
* uptime
- system uptime
* fs/*
- all supported filesystems
== Dev ==
The device virtual file system, located at /dev. Each device is a file and can
be talked to here. Here is some useful info from it
* random
- random data
* urandom
- less predictable random data
* zero
- outputs nothing
* tty*
- All of the different virual terminals
* cpu/*
- All cpu cores
* snd/*
- All sound devices
* usb/*
- USB devices
* disk/*
- All available disks, can be viewed by uuid, partlabel, and more
* mapper/*
- Where LVM partitions are mounted, including encrypted partitions and drives
== Updating the kernel ==
First be sure to mount the boot parition to /boot
Next copy your .config from the source directory of your previous kernel to
somewhere safe
For gentoo, you'll need to switch your /usr/src/linux symlink using eselect now
Now begins the commands
1) make mrproper
- make clean with no additional atrtifacts
2) cp /path/to/kernel/config .config
- Install old config file
3) make olddefconfig
- copy over old config options to new kernel config
4) make modules_prepare
- Prepare kernel modules on system
5) make -jX
- make the kernel! replace X with number of desired threads
6) make modules_install && make install
- install the new kernel and modules
7) (Gentoo) emerge @module-rebuild
- Recompile kernel modules to work with the new kenel
8) (Encrypted root only) genkernel --luks --lvm --kernel-config=/path/to/kernel/config initramfs
- If not on gentoo use distros initramfs build tool. splash adds a splash
screen and is not required
9) (Optional) Clean up all kernels
- Go ahead and remove all references in /boot to an older kernel. DO NOT
delete the current kernel, you may need it in case installing this kernel
fails!
10) grub-mkconfig -o /boot/grub/grub.cfg
- Let grub update its config to know that the new kernel exists
11) reboot
- reboot and hope it worked!
[[index]]

26
tech/ls.wiki Normal file
View File

@ -0,0 +1,26 @@
= ls =
List files in directory
== Usage and flags ==
ls [FLAGS] [FILE]
* [FILE]
- folder/file to list contents of. defaults to current dir.
* -a aka --all
- include hidden files in listing
* --color
- color the output
* -l aka --long
- show more info about files, like ownership, time last modified, etc
* -d aka --directory
- list only directories
* -h aka --human-readable
- list sizes of files in human readable format
* -s aka -size
- Print sizes of each file
For full usage use man ls
[[index]]

View File

@ -2,4 +2,14 @@
Misc. Stuff relating to computers and tech in general
== Tools ==
* [[imagemagick]]
* [[ffmpeg]]
== Stuff to do ==
* [[wireless_usb]]
[[index]]

25
tech/openrc.wiki Normal file
View File

@ -0,0 +1,25 @@
= Openrc =
The init system I use
== Configuration ==
* /etc/rc.conf
- global openrc config file
* /etc/conf.d
- Individual config file for each script
== Usage ==
{{{
#remove from a runlevel
rc-update delete <service> default
#show all init-script and their current runlevel
rc-update show -v
#show status of all services
rc-status --servicelist
}}}
[[index]]

View File

@ -3,8 +3,28 @@
The primary 'program' running on a machine that allows a user to run several
programs at once, manages drivers and hardware abstraction, etc
also see [[kernel]]
== CPUs ==
* [[RISC]]
* [[x86]]
* [[ARM]]
== Assembly ==
* [[../lang/x86]]
== Concepts ==
* [[scheduler]]
* [[microkernel]]
* [[monolithic_kernel]]
* [[system_calls]]
== Tools ==
* [[qemu]]
* [[cross_toolchain|Cross compiler toolchain]]
[[index]]

16
tech/pwd.wiki Normal file
View File

@ -0,0 +1,16 @@
= pwd =
Print the working directory
== Usage and Flags ==
pwd [-L|-P]
* -L
- print pwd that usually appears in command line status, aka LOGICAL path
* -P
- ignore symlinks, aka PHYSICAL path
also see man pwd
[[index]]

49
tech/qemu.wiki Normal file
View File

@ -0,0 +1,49 @@
= QEMU =
QEMU is a lightweight cli virtual machine program
== Making a virtual disk ==
To run a vm you need a virtual hard drive. To make one,
{{{
qemu-img create -f file_format <image_name> image_size
}}}
File format can be raw, qcow2, etc
size is notated with G for gigabytes, ie 5G is 5 gigabytes
== Making a virtual machine ==
We need a virtual disk and an iso file to run. To do this
{{{
qemu-system-x86_64 -cdrom iso_image -cpu host -enable-kvm -m RAM_size -smp
number_of_core -drive file=disk_image.iso,format=qcow2
}}}
-cdrom is for iso_image
-cpu host is to emulate the host processor
-enable-kvm uses the kernel virtual machine
-m is for memory, ie 2048
-smp is for the number of cores, ie 4
To run off of an already installed hard drive without an iso, run
{{{
qemu-system-x86_64 -cpu host -enable-kvm -m 2048 -smp 2 -drive
file=/path/to/vdisk.qcow2,format=qcow2
}}}
== Emulating different systems ==
If we want to emulate i386, replace 'qemu-system-x86_64' with
'qemu-system-i386'. This works with most other architectures, assuming you have
them installed.
[[index]]

View File

@ -0,0 +1,9 @@
= Raspberry Pi Pico =
Raspberry pi's micrcontroler, based on the RP2040
* https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf
[[index]]

18
tech/raspberry_pi.wiki Normal file
View File

@ -0,0 +1,18 @@
= Raspberry Pi =
Mainline tiny linux computers. Cheap as hell too
== Features ==
* [[ARM]] processors
* Can boot several OS's including linux
* Usually 802.11 and bluetooth
* 40 gpio pins
== Projects ==
* [[octopi]]
* [[NAS]]
* [[wireless_usb|Wireless USB]]
[[index]]

View File

@ -2,9 +2,18 @@
Tools useful for security, either offensive or defensive
== Cryptology ==
Hiding information
=== Ciphers ===
* [[substitution|Substitution]]
== Reconnaissance ==
* [[nmap|nmap]] - port scanner
* [[masscan]]

43
tech/substitution.wiki Normal file
View File

@ -0,0 +1,43 @@
= Substitution =
A Cipher where characters are replaced based on a mapping
== Monoalphabetic Subsititutions ==
Cipher where each occurrence of a plaintext symbol is replaced by a
corresponding ciphertext symbol
=== Afline ===
An affine cipher E(x) = (ax + b) MOD 26 is a monoalphabetic sub cipher, where a
and b are given constants
=== Columnar Transposition ===
Use letters to create columns, then fill all remaining columns with remaining
letters in alphabetic order
== Cryptoanalysis ==
=== Monoalphabetic Substitution ===
We make some assumptions
* Its english and has same stats as standard english
* word divisions are not preserved
* use frequency analysis to guess high frequency letters
- E E N O R I A S are 70% of letters in english
* identify
- vowels
- diagraphs (common combos of letters ie TH)
* Use cribs
* guess and rely on luck
== Also see ==
* [[gcd]]
[[index]]

18
tech/tar.wiki Normal file
View File

@ -0,0 +1,18 @@
= Tar =
Make tar balls and compress them
== Compress a folder ==
{{{
tar -czvf outfile.tar.gz /dir/to/compress
}}}
== Open a tar ball ==
{{{
tar -xzvf /path/to/tar/ball.tar.gz
}}}
[[index]]

32
tech/unix.wiki Normal file
View File

@ -0,0 +1,32 @@
= Unix =
The bell labs proposal for the best OS design ever
== Standard Utilities ==
* [[../lang/Bash]]
* [[ls]]
* [[cd]]
* [[pwd]]
* [[grep]]
* [[awk]]
* [[sed]]
* [[sort]]
* [[uniq]]
* [[shuf]]
* [[tar]]
== Gentoo ==
* [[gentoo_cheat_sheet|Gentoo Cheat Sheet]]
* [[openrc|Openrc]]
* [[kernel|Kernel updates and configuration]]
- [[kernel#Updating the kernel]] - Steps to update the kernel
* [[cross_toolchain|Cross toolchain]] - Setting up a cross compiling toolchain
== Cool stuff ==
* [[wireless_usb]]
[[index]]

36
tech/vim.wiki Normal file
View File

@ -0,0 +1,36 @@
= Vim =
This text editor, most likely unless you're on the website
== To use ==
run
{{{
:h vim
}}}
== Useful things ==
=== Dos to Unix line endings ===
To save the current file with different line endings, run
{{{
:w ++ff=unix
:w ++ff=mac
:w ++ff=dos
}}}
Replace w with e to replace the line endings in the editor
=== Search and replace ===
This will replace all instances of FOO with BAR:w
{{{
:s/FOO/BAR/g
}}}
[[index]]

40
tech/wireless_usb.wiki Normal file
View File

@ -0,0 +1,40 @@
= Wireless USB =
Provided a usb device over a network for another device
Best done with a [[raspberry_pi|Raspberry pi]]
== Steps ==
First you'll want a working pi with an internet connection. Be sure its
updated
1) sudo apt-get install usbip
- This is the actual kernel module that will be doing the heavy lifting
2) sudo modprobe usbip_host
- load the module into the kernel
3) now edit your modules file to add usbip on boot
{{{
#file: /etc/modules
usbip_host
}}}
4) Find the device you want to share (lsusb). Keep this in mind
5) usbip list -p -l
- This will list all the usb devices in a way usbip can understand. Find the
matching busid from above for your device
6) usbip bind --busid=<BUSID>
- Will bind the usb device to usbip
7) sudo usbipd
- Starts the usbip daemon. Will display what it is listening on
8) On the client machine, install usbip as well.
9) sudo modprobe vhci-hcd
- Load the module for networked usb
- Be sure that you have USB/IP support enabled compiled into your kernel
10) (Optional) /etc/modules
- Same as the pi
11) sudo usbip attach -r <PI_IP> -b <BUSID>
- Binds the usb device
And thats it! It should work now. This doesn't have to be with a raspberry pi
it can be with any device
[[index]]