diff --git a/Ideas.md.gpg b/Ideas.md.gpg index 704c4d6..af8e511 100644 Binary files a/Ideas.md.gpg and b/Ideas.md.gpg differ diff --git a/index.wiki b/index.wiki index 3712ee8..3dd7b65 100644 --- a/index.wiki +++ b/index.wiki @@ -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 === diff --git a/lang/Bash.wiki b/lang/Bash.wiki index ded8761..b7c4544 100644 --- a/lang/Bash.wiki +++ b/lang/Bash.wiki @@ -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]] diff --git a/lang/C.wiki b/lang/C.wiki index f9d1194..5d3dee2 100644 --- a/lang/C.wiki +++ b/lang/C.wiki @@ -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 == diff --git a/lang/Python.wiki b/lang/Python.wiki new file mode 100644 index 0000000..443e33c --- /dev/null +++ b/lang/Python.wiki @@ -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]] diff --git a/lang/index.wiki b/lang/index.wiki index 749ac4d..2691656 100644 --- a/lang/index.wiki +++ b/lang/index.wiki @@ -14,7 +14,10 @@ * [[Rust|Rust]] * [[Go|Go]] * [[sql|SQL]] +* [[x86|x86]] +== Also see == +* [[../tech/index]] [[../index]] diff --git a/sci/acids.wiki b/sci/acids.wiki index d903dae..b401dde 100644 --- a/sci/acids.wiki +++ b/sci/acids.wiki @@ -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]] diff --git a/sci/bases.wiki b/sci/bases.wiki index 0d6babe..3c7366d 100644 --- a/sci/bases.wiki +++ b/sci/bases.wiki @@ -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]] diff --git a/sci/bronsted-lowry.wiki b/sci/bronsted-lowry.wiki new file mode 100644 index 0000000..7710fc1 --- /dev/null +++ b/sci/bronsted-lowry.wiki @@ -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]] diff --git a/sci/chemicals/NCl3.wiki b/sci/chemicals/NCl3.wiki new file mode 100644 index 0000000..dd0fd24 --- /dev/null +++ b/sci/chemicals/NCl3.wiki @@ -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]] diff --git a/sci/chemicals/index.wiki b/sci/chemicals/index.wiki new file mode 100644 index 0000000..786cbec --- /dev/null +++ b/sci/chemicals/index.wiki @@ -0,0 +1,14 @@ += Chemicals = + +A list of chemicals that are interseting + +== General == + +* [[peroxide]] + +== Dangerous == + +* [[NCl3]] + + +[[../index]] diff --git a/sci/chemicals/peroxide.wiki b/sci/chemicals/peroxide.wiki new file mode 100644 index 0000000..757597f --- /dev/null +++ b/sci/chemicals/peroxide.wiki @@ -0,0 +1,6 @@ += Peroxide = + +A peroxide is any chemical in which two oxygen atoms are linked together by a +single covalent bond. + +[[index]] diff --git a/sci/chemistry.wiki b/sci/chemistry.wiki index c2a2b71..e82d47f 100644 --- a/sci/chemistry.wiki +++ b/sci/chemistry.wiki @@ -10,5 +10,4 @@ Took chemistry I Fall 2021. These are those notes * [[reactions|Reactions]] - [[index]] diff --git a/sci/electrolytes.wiki b/sci/electrolytes.wiki new file mode 100644 index 0000000..598f993 --- /dev/null +++ b/sci/electrolytes.wiki @@ -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]] diff --git a/sci/index.wiki b/sci/index.wiki index af8bb0b..68723ab 100644 --- a/sci/index.wiki +++ b/sci/index.wiki @@ -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]] diff --git a/sci/ionic_equations.wiki b/sci/ionic_equations.wiki new file mode 100644 index 0000000..9f59258 --- /dev/null +++ b/sci/ionic_equations.wiki @@ -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]] diff --git a/sci/naming.wiki b/sci/naming.wiki index fddd860..424eb82 100644 --- a/sci/naming.wiki +++ b/sci/naming.wiki @@ -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]] diff --git a/sci/pH.wiki b/sci/pH.wiki new file mode 100644 index 0000000..ba3dc9d --- /dev/null +++ b/sci/pH.wiki @@ -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) diff --git a/sci/reactions.wiki b/sci/reactions.wiki index d8662e7..aa4c2d4 100644 --- a/sci/reactions.wiki +++ b/sci/reactions.wiki @@ -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]] diff --git a/sci/salts.wiki b/sci/salts.wiki index 48ef6fb..0c799eb 100644 --- a/sci/salts.wiki +++ b/sci/salts.wiki @@ -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]] diff --git a/sci/solution.wiki b/sci/solution.wiki index 7faef1c..7a28fdb 100644 --- a/sci/solution.wiki +++ b/sci/solution.wiki @@ -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]] diff --git a/tech/3D_printing.wiki b/tech/3D_printing.wiki new file mode 100644 index 0000000..f10b97e --- /dev/null +++ b/tech/3D_printing.wiki @@ -0,0 +1,6 @@ += 3D Printing = + +3D printers can make stuff from raw spools of plastic + + +[[index]] diff --git a/tech/K-map.wiki b/tech/K-map.wiki new file mode 100644 index 0000000..2592870 --- /dev/null +++ b/tech/K-map.wiki @@ -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]] diff --git a/tech/algorithms.wiki b/tech/algorithms.wiki index afc2f61..58c6418 100644 --- a/tech/algorithms.wiki +++ b/tech/algorithms.wiki @@ -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]] diff --git a/tech/android.wiki b/tech/android.wiki new file mode 100644 index 0000000..ad61e9d --- /dev/null +++ b/tech/android.wiki @@ -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) diff --git a/tech/arduino_nano.wiki b/tech/arduino_nano.wiki index dbd0588..2407cab 100644 --- a/tech/arduino_nano.wiki +++ b/tech/arduino_nano.wiki @@ -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]] diff --git a/tech/binary_tree.wiki b/tech/binary_tree.wiki new file mode 100644 index 0000000..b20d9c9 --- /dev/null +++ b/tech/binary_tree.wiki @@ -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]] diff --git a/tech/cross_toolchain.wiki b/tech/cross_toolchain.wiki new file mode 100644 index 0000000..46382c4 --- /dev/null +++ b/tech/cross_toolchain.wiki @@ -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]] diff --git a/tech/development.wiki b/tech/development.wiki index 0881ae3..5be327a 100644 --- a/tech/development.wiki +++ b/tech/development.wiki @@ -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 diff --git a/tech/electronics.wiki b/tech/electronics.wiki index ea59f29..3ac652c 100644 --- a/tech/electronics.wiki +++ b/tech/electronics.wiki @@ -3,13 +3,19 @@ Both digital and analog components -= Combinational = +== Combinational == * [[multiplexer|Multiplexer]] -= Sequential = +== Sequential == * [[buffer|Buffer]] +== Theoretical == + +* [[K-map]] + + + [[index]] diff --git a/tech/embedded.wiki b/tech/embedded.wiki index e541976..b30c664 100644 --- a/tech/embedded.wiki +++ b/tech/embedded.wiki @@ -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]] diff --git a/tech/ffmpeg.wiki b/tech/ffmpeg.wiki new file mode 100644 index 0000000..f924109 --- /dev/null +++ b/tech/ffmpeg.wiki @@ -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]] diff --git a/tech/gcd.wiki b/tech/gcd.wiki new file mode 100644 index 0000000..f80cdc1 --- /dev/null +++ b/tech/gcd.wiki @@ -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]] diff --git a/tech/gentoo_cheat_sheet.wiki b/tech/gentoo_cheat_sheet.wiki new file mode 100644 index 0000000..e8d9a10 --- /dev/null +++ b/tech/gentoo_cheat_sheet.wiki @@ -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]] diff --git a/tech/hash_table.wiki b/tech/hash_table.wiki index 0815ad2..be57637 100644 --- a/tech/hash_table.wiki +++ b/tech/hash_table.wiki @@ -6,7 +6,7 @@ flavors. == Good For == -* Crazy fast [[look]] ups +* Crazy fast look ups == Bad for == diff --git a/tech/imagemagick.wiki b/tech/imagemagick.wiki new file mode 100644 index 0000000..ee2d1f5 --- /dev/null +++ b/tech/imagemagick.wiki @@ -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]] diff --git a/tech/index.wiki b/tech/index.wiki index c0772f9..fcc613c 100644 --- a/tech/index.wiki +++ b/tech/index.wiki @@ -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]] diff --git a/tech/kernel.wiki b/tech/kernel.wiki new file mode 100644 index 0000000..2c65a1d --- /dev/null +++ b/tech/kernel.wiki @@ -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]] diff --git a/tech/ls.wiki b/tech/ls.wiki new file mode 100644 index 0000000..ba62d9a --- /dev/null +++ b/tech/ls.wiki @@ -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]] diff --git a/tech/misc.wiki b/tech/misc.wiki index 20765c6..8118375 100644 --- a/tech/misc.wiki +++ b/tech/misc.wiki @@ -2,4 +2,14 @@ Misc. Stuff relating to computers and tech in general +== Tools == + +* [[imagemagick]] +* [[ffmpeg]] + +== Stuff to do == + +* [[wireless_usb]] + + [[index]] diff --git a/tech/openrc.wiki b/tech/openrc.wiki new file mode 100644 index 0000000..e2ccec4 --- /dev/null +++ b/tech/openrc.wiki @@ -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 default + +#show all init-script and their current runlevel +rc-update show -v + +#show status of all services +rc-status --servicelist + }}} + +[[index]] diff --git a/tech/os.wiki b/tech/os.wiki index dc5b24c..5d0444c 100644 --- a/tech/os.wiki +++ b/tech/os.wiki @@ -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]] diff --git a/tech/pwd.wiki b/tech/pwd.wiki new file mode 100644 index 0000000..eceb15f --- /dev/null +++ b/tech/pwd.wiki @@ -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]] diff --git a/tech/qemu.wiki b/tech/qemu.wiki new file mode 100644 index 0000000..b33f2ce --- /dev/null +++ b/tech/qemu.wiki @@ -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_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]] diff --git a/tech/rapsberry_pi_pico.wiki b/tech/rapsberry_pi_pico.wiki new file mode 100644 index 0000000..b110c1e --- /dev/null +++ b/tech/rapsberry_pi_pico.wiki @@ -0,0 +1,9 @@ += Raspberry Pi Pico = + +Raspberry pi's micrcontroler, based on the RP2040 + +* https://datasheets.raspberrypi.org/pico/pico-datasheet.pdf + + + +[[index]] diff --git a/tech/raspberry_pi.wiki b/tech/raspberry_pi.wiki new file mode 100644 index 0000000..46630e5 --- /dev/null +++ b/tech/raspberry_pi.wiki @@ -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]] diff --git a/tech/security.wiki b/tech/security.wiki index 06e96f7..1b6373b 100644 --- a/tech/security.wiki +++ b/tech/security.wiki @@ -2,9 +2,18 @@ Tools useful for security, either offensive or defensive +== Cryptology == + +Hiding information + +=== Ciphers === + +* [[substitution|Substitution]] + == Reconnaissance == * [[nmap|nmap]] - port scanner +* [[masscan]] diff --git a/tech/substitution.wiki b/tech/substitution.wiki new file mode 100644 index 0000000..4ceea7b --- /dev/null +++ b/tech/substitution.wiki @@ -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]] diff --git a/tech/tar.wiki b/tech/tar.wiki new file mode 100644 index 0000000..2dc8fdd --- /dev/null +++ b/tech/tar.wiki @@ -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]] diff --git a/tech/unix.wiki b/tech/unix.wiki new file mode 100644 index 0000000..5bb515d --- /dev/null +++ b/tech/unix.wiki @@ -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]] diff --git a/tech/vim.wiki b/tech/vim.wiki new file mode 100644 index 0000000..e908487 --- /dev/null +++ b/tech/vim.wiki @@ -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]] diff --git a/tech/wireless_usb.wiki b/tech/wireless_usb.wiki new file mode 100644 index 0000000..808529b --- /dev/null +++ b/tech/wireless_usb.wiki @@ -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= + - 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 -b + - 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]]