# notes

path: Weaving_the_Web_Berners_Lee.md
sortable_path: Weaving_the_Web_Berners_Lee.md
title: Weaving the Web (Berners-Lee, 1999)
checksum: 3761dfc6b81bf13c1e89e99bd3610c27737224fb4f5a3d5e66e13fd1ce071eb6
created: 2024-11-04 15:20:40.673485872+00:00
modified: 2025-01-09 18:51:19.315768345+00:00
metadata: {"created":"Monday, November 04, 2024","tags":["literature","ecopolsoc","world-wide-web"]}
lead:
  Tim did not really conceive of the possibility of the centralising and
  totalising effects of social media:

body:
  Tim did not really conceive of the possibility of the centralising and
  totalising effects of social media:

  _The Web's universality leads to a thriving richness and diversity. If a company
  claims to give access to the world of information, then presents a filtered
  view, the Web loses its credibility._ (p.143)

  _Happily, the Web is so huge that there's no way any one company can dominate
  it. All the human effort people and organisations have put in all over the world
  to create Web sites and home pages is astoundingly large, and most of the effort
  has to do with what's in the Web, not the software used to browse it. The Web's
  content, and thus value, will continue despite any one company's actions._
  (p.144)

  Apropos the "alt-right" etc:

  _The analogy of a global brain is tempting, because Web and brain both involve
  huge numbers of elements - neurons and Web pages - and a mixture of structure
  and apparent randomness. However, a brain has an intelligence that emerges on
  quite a different level from anything that a neuron could be aware
  of...[W]riters have contemplated an 'emergent property' arising from the mass of
  humanity and computers. But remember that such a phenomenon would have its own
  agenda. We would not as individuals be ware of it, let alone control it, any
  more than the neuron controls the brain._ (p.222)

raw_content:
  ---
  tags: [literature, ecopolsoc, world-wide-web]
  created: Monday, November 04, 2024
  ---

  # Weaving the Web (Berners-Lee, 1999)

  Tim did not really conceive of the possibility of the centralising and
  totalising effects of social media:

  _The Web's universality leads to a thriving richness and diversity. If a company
  claims to give access to the world of information, then presents a filtered
  view, the Web loses its credibility._ (p.143)

  _Happily, the Web is so huge that there's no way any one company can dominate
  it. All the human effort people and organisations have put in all over the world
  to create Web sites and home pages is astoundingly large, and most of the effort
  has to do with what's in the Web, not the software used to browse it. The Web's
  content, and thus value, will continue despite any one company's actions._
  (p.144)

  Apropos the "alt-right" etc:

  _The analogy of a global brain is tempting, because Web and brain both involve
  huge numbers of elements - neurons and Web pages - and a mixture of structure
  and apparent randomness. However, a brain has an intelligence that emerges on
  quite a different level from anything that a neuron could be aware
  of...[W]riters have contemplated an 'emergent property' arising from the mass of
  humanity and computers. But remember that such a phenomenon would have its own
  agenda. We would not as individuals be ware of it, let alone control it, any
  more than the neuron controls the brain._ (p.222)


path: c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md
sortable_path: c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md
title: c301a0b3_Mosaic_Netscape_and_Browser_Wars
checksum: 2932435c9c734455a7996da2c686501f21609773035248164eb5f8b8cc59abf8
created: 2024-11-04 15:35:45.011665284+00:00
modified: 2024-11-04 16:40:18.394456919+00:00
metadata: {"created":"Sunday, November 03, 2024","tags":["world-wide-web","computer-history","Microsoft"]}
lead:
  The Mosaic browser was conceived and produced at the University of Illinois
  during the very early growth of the Web, when TBL was still at CERN.

body:
  The Mosaic browser was conceived and produced at the University of Illinois
  during the very early growth of the Web, when TBL was still at CERN.

  _Mosaic_:

  ![Mosaic browser](../img/mosaic-browser.jpg)

  It became the best of the early browsers (a group that included ViolaWWW and
  Erwise) with the notable advantage of being able to embed graphics alongside
  text (instead of inside a separate window). It also supported multiple
  [application layer](Application_Layer_of_Internet_Protocol.md) protocols - FTP,
  the Network News Transfer Protocol, Gopher - not just HTTP.

  At this point there were nascent browsers for different operating systems and
  which browser you used was mostly determined by your OS. Being the product of a
  US university, Mosaic was originally written for Unix's X-Window system but was
  ported to multiple OSs later, a key factor in its success and uptake.

  Mosaic's creators formed their own company outside of the university: Netscape.
  The browser they created, Netscape Navigator became the heir to Mosaic, released
  in 1994.

  _Netscape Navigator_:

  ![Netscape Navigator](../img/Navigator_Netscape.png)

  It was made free of charge for non-commercial use which assured rapid uptake.
  This was done to outrun Microsoft's Internet Explorer (released two months after
  Netscape went public) which they intended to bundle with all new versions of
  Windows 95. Netscape became the de facto standard browser during the early Web,
  including on Windows. It took a few years for IE to overtake it.

  _Internet Explorer 1 with licensing info_:

  ![Internet Explorer](../img/internet_explorer.png)

  Netscape also birthed JavaScript, which was written rapidly specifically for the
  browser. Prior to this, dynamic client-side functionality was provided by Java
  'applets' which never really took off.

  IE in fact shares a genealogy with Mosaic since Microsoft licensed a version of
  the Mosaic code and used it to construct IE.

  By the end of the 1990s, Netscape's usage had declined precipitously as IE
  captured the market share.

raw_content:
  ---
  tags: [world-wide-web, computer-history, Microsoft]
  created: Sunday, November 03, 2024
  ---

  # c301a0b3_Mosaic_Netscape_and_Browser_Wars

  The Mosaic browser was conceived and produced at the University of Illinois
  during the very early growth of the Web, when TBL was still at CERN.

  _Mosaic_:

  ![Mosaic browser](../img/mosaic-browser.jpg)

  It became the best of the early browsers (a group that included ViolaWWW and
  Erwise) with the notable advantage of being able to embed graphics alongside
  text (instead of inside a separate window). It also supported multiple
  [application layer](Application_Layer_of_Internet_Protocol.md) protocols - FTP,
  the Network News Transfer Protocol, Gopher - not just HTTP.

  At this point there were nascent browsers for different operating systems and
  which browser you used was mostly determined by your OS. Being the product of a
  US university, Mosaic was originally written for Unix's X-Window system but was
  ported to multiple OSs later, a key factor in its success and uptake.

  Mosaic's creators formed their own company outside of the university: Netscape.
  The browser they created, Netscape Navigator became the heir to Mosaic, released
  in 1994.

  _Netscape Navigator_:

  ![Netscape Navigator](../img/Navigator_Netscape.png)

  It was made free of charge for non-commercial use which assured rapid uptake.
  This was done to outrun Microsoft's Internet Explorer (released two months after
  Netscape went public) which they intended to bundle with all new versions of
  Windows 95. Netscape became the de facto standard browser during the early Web,
  including on Windows. It took a few years for IE to overtake it.

  _Internet Explorer 1 with licensing info_:

  ![Internet Explorer](../img/internet_explorer.png)

  Netscape also birthed JavaScript, which was written rapidly specifically for the
  browser. Prior to this, dynamic client-side functionality was provided by Java
  'applets' which never really took off.

  IE in fact shares a genealogy with Mosaic since Microsoft licensed a version of
  the Mosaic code and used it to construct IE.

  By the end of the 1990s, Netscape's usage had declined precipitously as IE
  captured the market share.


path: ecec56e6_precursors_to_search_engines.md
sortable_path: ecec56e6_precursors_to_search_engines.md
title: ecec56e6_precursors_to_search_engines
checksum: f160dea20cd9f987f808c75db9e5931b5357007d35513bd3a30476ea42945ed3
created: 2024-11-04 15:59:31.8979808+00:00
modified: 2024-11-04 16:07:38.069712579+00:00
metadata: {"created":"Monday, November 04, 2024","tags":["world-wide-web","computer-history"]}
lead:
  Before search engines as searchable indices of all content on the web, the
  custom was for ISPs, browsers and websites (e.g. Yahoo!) to provide directories
  of links to other sites. They functioned as sort of global web-portals.

body:
  Before search engines as searchable indices of all content on the web, the
  custom was for ISPs, browsers and websites (e.g. Yahoo!) to provide directories
  of links to other sites. They functioned as sort of global web-portals.

  ![Yahoo's original homepage](../img/yahoo-original-homepage.png)

  _The Yahoo! homepage from 1999._

  ![AltaVista homepage](../img/alta-vista.png)

  _The AltaVista homepage from 1999. It has a primitive search engine but also
  directories of sites._

raw_content:
  ---
  tags: [world-wide-web, computer-history]
  created: Monday, November 04, 2024
  ---

  # ecec56e6_precursors_to_search_engines

  Before search engines as searchable indices of all content on the web, the
  custom was for ISPs, browsers and websites (e.g. Yahoo!) to provide directories
  of links to other sites. They functioned as sort of global web-portals.

  ![Yahoo's original homepage](../img/yahoo-original-homepage.png)

  _The Yahoo! homepage from 1999._

  ![AltaVista homepage](../img/alta-vista.png)

  _The AltaVista homepage from 1999. It has a primitive search engine but also
  directories of sites._


path: f6564af9_AOL_and_early_internet_enclosure.md
sortable_path: f6564af9_AOL_and_early_internet_enclosure.md
title: f6564af9_AOL_and_early_internet_enclosure
checksum: 8f2eefe769e6cd66fe8b5a4402b0a972e07f5cb2955ae3694dc7dca203fc5dda
created: 2024-11-04 16:08:34.73788458+00:00
modified: 2025-01-09 18:51:36.342729966+00:00
lead:
  We might view AOL, with its ubiquitous 'free trial' CD-ROMs, as the first
  attempt by a corporate entity to try and enclose the Internet/Web. To take the
  vast informational expanse and reduce it to a single, filtered and contained
  space controlled by a single company.

body:
  We might view AOL, with its ubiquitous 'free trial' CD-ROMs, as the first
  attempt by a corporate entity to try and enclose the Internet/Web. To take the
  vast informational expanse and reduce it to a single, filtered and contained
  space controlled by a single company.

  ![Early AOL interface](../img/aol-on-windows.jpg)

  _AOL interface from 1993_

  This would later be achieved or approximated more effectively by Google (under
  the guise of doing the opposite - people are "empowered" to access the
  information they otherwise would not find, granted a key to the Internet etc.
  When in fact, making everyone go through the same gate enables surveillance and
  the monetisation of the use of a public resource) and then of course by the
  social media companies.

  AOL in fact started this even before there was a Web, pioneering the concept of
  a web portal, with their [modem-based](cfbef1c4_web_precursors.md) private-BBS
  business model. This provided access to a circumscribed subset of the Internet
  at a time when accessing information was opaque and confusing to the average
  non-technical user. The advent of the web first threatened and then basically
  obviated this model, when access to information via browsers and HTTP servers
  made the process easier and more democratized. Hence why AOL then tellingly
  pivoted to the browser and search-engine market (purchasing
  [Netscape](c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md) in 1999), the next
  available mechanism of enclosure.

  ![AOL homepage](../img/aol-original.jpg)

  _AOL interface from 1999_

raw_content:
  ---
  tags: [world-wide-web, computer-history, internet, ecopolsoc, bulletin-boards]
  created: Monday, November 04, 2024
  ---

  # f6564af9_AOL_and_early_internet_enclosure

  We might view AOL, with its ubiquitous 'free trial' CD-ROMs, as the first
  attempt by a corporate entity to try and enclose the Internet/Web. To take the
  vast informational expanse and reduce it to a single, filtered and contained
  space controlled by a single company.

  ![Early AOL interface](../img/aol-on-windows.jpg)

  _AOL interface from 1993_

  This would later be achieved or approximated more effectively by Google (under
  the guise of doing the opposite - people are "empowered" to access the
  information they otherwise would not find, granted a key to the Internet etc.
  When in fact, making everyone go through the same gate enables surveillance and
  the monetisation of the use of a public resource) and then of course by the
  social media companies.

  AOL in fact started this even before there was a Web, pioneering the concept of
  a web portal, with their [modem-based](cfbef1c4_web_precursors.md) private-BBS
  business model. This provided access to a circumscribed subset of the Internet
  at a time when accessing information was opaque and confusing to the average
  non-technical user. The advent of the web first threatened and then basically
  obviated this model, when access to information via browsers and HTTP servers
  made the process easier and more democratized. Hence why AOL then tellingly
  pivoted to the browser and search-engine market (purchasing
  [Netscape](c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md) in 1999), the next
  available mechanism of enclosure.

  ![AOL homepage](../img/aol-original.jpg)

  _AOL interface from 1999_

metadata:
  {"created":"Monday, November 04, 2024","tags":["world-wide-web","computer-history","internet","ecopolsoc","bulletin-boards"]}


path: 241fe1a3_the_Web_versus_modem_BBSs.md
sortable_path: 241fe1a3_the_Web_versus_modem_BBSs.md
title: 241fe1a3_the_Web_versus_modem_BBSs
checksum: 84911f03e729d16f43038f10b328821c150b1b362115c555864dea1e500d54e4
created: 2024-11-04 16:43:52.707927075+00:00
modified: 2024-11-04 18:33:45.584497495+00:00
lead:
  As access to the Web and the demand for public access grew, services like AOL,
  which provided dial-up access to a subset of the broader Internet (along with
  email and chat-rooms) became increasingly redundant.

body:
  As access to the Web and the demand for public access grew, services like AOL,
  which provided dial-up access to a subset of the broader Internet (along with
  email and chat-rooms) became increasingly redundant.

  In response to this, they pivoted in their marketing to presenting their service
  as a safe, curated means of accessing the information: the Web was confusing, it
  was hard to know what was out there and how to find useful information.

  By using AOL, you would know which sites to visit for different tasks and which
  of these were reputable. They adopted a kind of friendly gatekeeper persona in
  the era of unhampered and universal access to information that the Web heralded
  and embodied.

  (This isn't so strange if we consider that outside of work (and the communities
  of computer enthusiasts), personal computers were still relatively new and
  computers themselves still rather forbidding entities.)

  This function of a gateway to the overwhelming content of the web would be taken
  up first by browsers
  ([Mosaic's](c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md) landing page would
  list websites for specific sources of information and user tasks and links to
  other directories) and then of course search engines which would allow users to
  search for what they needed against an index (usually a subset) of the Web's
  total content. (Interestingly in this regard, AOL would eventually buy
  Netscape.)

  AOL et al made sense when users wanted access to the internet and the web didn't
  yet exist. Different networks had different access criteria and were often
  poorly signposted, accessible only to those in the know. Private commercial
  networks were set up to service typical consumer needs (news, banking, weather
  reports etc) but the whole point of the Web as conceived by TBL was to make
  everything available to anyone who wanted it through a streamlined and universal
  set of protocols.

raw_content:
  ---
  tags: [world-wide-web, computer-history, internet, bulletin-boards]
  created: Monday, November 04, 2024
  ---

  # 241fe1a3_the_Web_versus_modem_BBSs

  As access to the Web and the demand for public access grew, services like AOL,
  which provided dial-up access to a subset of the broader Internet (along with
  email and chat-rooms) became increasingly redundant.

  In response to this, they pivoted in their marketing to presenting their service
  as a safe, curated means of accessing the information: the Web was confusing, it
  was hard to know what was out there and how to find useful information.

  By using AOL, you would know which sites to visit for different tasks and which
  of these were reputable. They adopted a kind of friendly gatekeeper persona in
  the era of unhampered and universal access to information that the Web heralded
  and embodied.

  (This isn't so strange if we consider that outside of work (and the communities
  of computer enthusiasts), personal computers were still relatively new and
  computers themselves still rather forbidding entities.)

  This function of a gateway to the overwhelming content of the web would be taken
  up first by browsers
  ([Mosaic's](c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md) landing page would
  list websites for specific sources of information and user tasks and links to
  other directories) and then of course search engines which would allow users to
  search for what they needed against an index (usually a subset) of the Web's
  total content. (Interestingly in this regard, AOL would eventually buy
  Netscape.)

  AOL et al made sense when users wanted access to the internet and the web didn't
  yet exist. Different networks had different access criteria and were often
  poorly signposted, accessible only to those in the know. Private commercial
  networks were set up to service typical consumer needs (news, banking, weather
  reports etc) but the whole point of the Web as conceived by TBL was to make
  everything available to anyone who wanted it through a streamlined and universal
  set of protocols.

metadata:
  {"created":"Monday, November 04, 2024","tags":["world-wide-web","computer-history","internet","bulletin-boards"]}


path: Using_SQLite_with_Python.md
sortable_path: Using_SQLite_with_Python.md
title: Using SQLite with Python
lead: SQLite is part of the core library, you do not require a separate package
checksum: 03ce3deea72df42fd5f2a60f72b37b791107c9ddc87f97b87fa48674925c6750
created: 2024-11-07 07:27:38.831355238+00:00
modified: 2024-11-14 14:43:27.013210641+00:00
metadata: {"created":"Thursday, November 07, 2024","tags":["python","databases","SQL","SQLite"]}
body:
  SQLite is part of the core library, you do not require a separate package

  ```py
  import sqlite3
  ```

  ## Connect to database

  Connect to an existing SQLite `.db` file or create a new database with the same
  command:

  ```py
  connection = sqlite3.connect("my_database.db")
  ```

  ## Disconnect from database

  ```python
  connection.close()
  ```

  ## Querying

  `connect` exposes a `cursor` entity. This is used for executing changes against
  the database file.

  ### Example: creating a table

  ```python
  CREATE_TAGS_TABLE = """
  CREATE TABLE IF NOT EXISTS tags (
      name TEXT PRIMARY KEY
  )
  """

  cursor = connection.cursor()
  cursor.execute(CREATE_TAGS_TABLE)
  cursor.commit()

  # Confirm changes

  cursor.execute("SELECT name from sqlite_master WHERE type='table'")
  print(cursor.fetchall())
  # (tags)
  ```

  Note that it is necessary to `commit` the changes. The cursor object just stores
  the operation in memory and does not execute until you specifically commit them.

  ## Prepared statements and parameterised queries

  ### Parameterised queries

  ```py
  username = "thomas"
  password = "123"
  cursor.execute("SELECT * FROM users WHERE username = ? AND password = ?",
              (username, password))
  ```

  Alternatively, pass the [tuple](Tuples_in_Python.md) directly:

  ```python
  login_data = ("thomas", "123")
  cursor.execute("SELECT * FROM users WHERE username = ? AND password = ?",
  login_data)
  ```

  ### Prepared statements

  > With prepared statements you have to pass in the parameters as a dictionary

  ```python
  user_data = {
      "username": "thomas",
      "email": "thomas@email.com"
  }

  cursor.execute("INSERT INTO users (username, email) VALUES (:username, :email)",
                 user_data)
  ```

  In the example above it so happens that we already have a dictionary we are
  working with. If you want to use a prepared statement and you don't have a
  dictionary already, you will need to construct one as part of the query, e.g:

  ```python
  cursor.execute("INSERT INTO table_name (value_one, value_two) VALUES (:value_one, :value_two)", { value_one: 'foo', value_two: 'bar'})
  ```

raw_content:
  ---
  tags: [python, databases, SQL, SQLite]
  created: Thursday, November 07, 2024
  ---

  # Using SQLite with Python

  SQLite is part of the core library, you do not require a separate package

  ```py
  import sqlite3
  ```

  ## Connect to database

  Connect to an existing SQLite `.db` file or create a new database with the same
  command:

  ```py
  connection = sqlite3.connect("my_database.db")
  ```

  ## Disconnect from database

  ```python
  connection.close()
  ```

  ## Querying

  `connect` exposes a `cursor` entity. This is used for executing changes against
  the database file.

  ### Example: creating a table

  ```python
  CREATE_TAGS_TABLE = """
  CREATE TABLE IF NOT EXISTS tags (
      name TEXT PRIMARY KEY
  )
  """

  cursor = connection.cursor()
  cursor.execute(CREATE_TAGS_TABLE)
  cursor.commit()

  # Confirm changes

  cursor.execute("SELECT name from sqlite_master WHERE type='table'")
  print(cursor.fetchall())
  # (tags)
  ```

  Note that it is necessary to `commit` the changes. The cursor object just stores
  the operation in memory and does not execute until you specifically commit them.

  ## Prepared statements and parameterised queries

  ### Parameterised queries

  ```py
  username = "thomas"
  password = "123"
  cursor.execute("SELECT * FROM users WHERE username = ? AND password = ?",
              (username, password))
  ```

  Alternatively, pass the [tuple](Tuples_in_Python.md) directly:

  ```python
  login_data = ("thomas", "123")
  cursor.execute("SELECT * FROM users WHERE username = ? AND password = ?",
  login_data)
  ```

  ### Prepared statements

  > With prepared statements you have to pass in the parameters as a dictionary

  ```python
  user_data = {
      "username": "thomas",
      "email": "thomas@email.com"
  }

  cursor.execute("INSERT INTO users (username, email) VALUES (:username, :email)",
                 user_data)
  ```

  In the example above it so happens that we already have a dictionary we are
  working with. If you want to use a prepared statement and you don't have a
  dictionary already, you will need to construct one as part of the query, e.g:

  ```python
  cursor.execute("INSERT INTO table_name (value_one, value_two) VALUES (:value_one, :value_two)", { value_one: 'foo', value_two: 'bar'})
  ```


path: 0716531c_rewilding_the_internet.md
sortable_path: 0716531c_rewilding_the_internet.md
title: 0716531c_rewilding_the_internet
checksum: bf356c0a1ef11f4c0f98e42151962507661eb1e1b464a2a2fb1f085aa2ec5999
created: 2024-11-07 09:45:05.17798276+00:00
modified: 2024-11-19 17:43:28.175211723+00:00
metadata: {"created":"Thursday, November 07, 2024","tags":["ecopolsoc","internet"]}
lead:
  The following
  [analogy](https://www.noemamag.com/we-need-to-rewild-the-internet/) can be
  useful in understanding how the internet has become such a negative environment.
  How it has transmogrified from its original promise of a humanistic space that
  would facilitate the connection of individuals based on shared interests and
  values to an environment that is entirely mediated by capital, subject to
  control, censorship and the violation of privacy.

body:
  The following
  [analogy](https://www.noemamag.com/we-need-to-rewild-the-internet/) can be
  useful in understanding how the internet has become such a negative environment.
  How it has transmogrified from its original promise of a humanistic space that
  would facilitate the connection of individuals based on shared interests and
  values to an environment that is entirely mediated by capital, subject to
  control, censorship and the violation of privacy.

  In the 18th-century in the northern German states, officials decided to
  rationalise the production of timber to enable more systematic extraction.
  (Clearly a product of Enlightenment principles of applying reason and science to
  agriculture similar to Jethro Tull's invention of the seed drill and the
  suspension of three-field rotation to four-field all-round harvesting.)

  Instead of a sprawling forest ecosystem that had developed naturally over
  hundreds of thousands of years, which allowed for felling without upsetting the
  continuance of the system, the forests were stripped and trees were planted in
  rows and grids with the arrangement designed to maximise yield and access. This
  would be broadly analogous to the factory-farming of chickens compared to
  free-range rearing.

  For the first cycle it appeared as if this restructuring was a huge success.
  Yields were high and the timber was of excellent quality. This was a false dawn,
  however. The subsequent yields were a complete failure compared to the past.
  Fewer trees grew and those that did had a reduced yield and were subject to
  disease. The overall health of the forests declined precipitously.

  What explains the initial success? It was made possible by the preceding
  centuries of free-range growth and husbandry. The seeming success of the new
  system was a product of the generations of investment in the natural ecosystem.
  This was exhausted in one cycle of the new regime.

  Taking this back to the Web, the analogy is that the web was initially a natural
  ecosystem of different communities and technologies developing organically out
  of the original open and decentralised protocols. From this diversity emerged a
  formidably rich informational space.

  Since then, the Web has become highly centralised and homogenised with a tiny
  cadre of corporations determining how individuals communicate, share and access
  information (Google for search, Android or Apple for phone, Twitter or Facebook
  etc.).

  The initial fruits of this centralisation (just like the forest 'optimisation')
  appeared to be beneficial in the initial 'heyday' of the 2010s when social-media
  was new and full of prospect (the political benefits of Twitter and enriched
  public sphere, the 'Arab Spring', WikiLeaks etc). But this actually proved to be
  a nadir. The vitality on display was a product of the preceding era of the
  natural growth of the Web ecosystem.

  This decline in quality should be apparent to any reflective user:

  - the saturation of advertising to the point where many websites are unusable
  - the confection of low-quality content to game 'organic' search rankings
  - the surveillance of users across sites and devices to enable the extraction of
    profitable marketing data
  - the censorship of political content for the 'violation' of bogus terms of use
    on social media platforms if it does not the serve the broader interests of
    capital and western imperialism
  - the saturation of pornography and dehumanising media more generally

  Thbs has also involved the reshaping of Internet users themselves, from active
  and independent _agents_, to drone-like passive _consumers_ of drivel engineered
  to maximise 'engagement' (the monopolisation of attention), where users are like
  the viewers of _Infinite Jest_. See, e.g TikTok and its clones.

  There are many further points that can be made and ideas that can be
  extrapolated from this. Two examples:

  - the emergence of supposed 'AI' is going to lead to greater content
    homogenisation and the intensification of informational entropy as the
    technological mechanism consists in feeding the regurgitated content of the
    internet back into itself

  - reality itself has become infected by the disease that killed the Web
    (ecocide). The distinction between offline and online is becoming increasingly
    hard to draw (politics - the normalisation and ascendancy of the far right and
    subsequent destabilisation of western states)

raw_content:
  ---
  tags: [ecopolsoc, internet]
  created: Thursday, November 07, 2024
  ---

  # 0716531c_rewilding_the_internet

  The following
  [analogy](https://www.noemamag.com/we-need-to-rewild-the-internet/) can be
  useful in understanding how the internet has become such a negative environment.
  How it has transmogrified from its original promise of a humanistic space that
  would facilitate the connection of individuals based on shared interests and
  values to an environment that is entirely mediated by capital, subject to
  control, censorship and the violation of privacy.

  In the 18th-century in the northern German states, officials decided to
  rationalise the production of timber to enable more systematic extraction.
  (Clearly a product of Enlightenment principles of applying reason and science to
  agriculture similar to Jethro Tull's invention of the seed drill and the
  suspension of three-field rotation to four-field all-round harvesting.)

  Instead of a sprawling forest ecosystem that had developed naturally over
  hundreds of thousands of years, which allowed for felling without upsetting the
  continuance of the system, the forests were stripped and trees were planted in
  rows and grids with the arrangement designed to maximise yield and access. This
  would be broadly analogous to the factory-farming of chickens compared to
  free-range rearing.

  For the first cycle it appeared as if this restructuring was a huge success.
  Yields were high and the timber was of excellent quality. This was a false dawn,
  however. The subsequent yields were a complete failure compared to the past.
  Fewer trees grew and those that did had a reduced yield and were subject to
  disease. The overall health of the forests declined precipitously.

  What explains the initial success? It was made possible by the preceding
  centuries of free-range growth and husbandry. The seeming success of the new
  system was a product of the generations of investment in the natural ecosystem.
  This was exhausted in one cycle of the new regime.

  Taking this back to the Web, the analogy is that the web was initially a natural
  ecosystem of different communities and technologies developing organically out
  of the original open and decentralised protocols. From this diversity emerged a
  formidably rich informational space.

  Since then, the Web has become highly centralised and homogenised with a tiny
  cadre of corporations determining how individuals communicate, share and access
  information (Google for search, Android or Apple for phone, Twitter or Facebook
  etc.).

  The initial fruits of this centralisation (just like the forest 'optimisation')
  appeared to be beneficial in the initial 'heyday' of the 2010s when social-media
  was new and full of prospect (the political benefits of Twitter and enriched
  public sphere, the 'Arab Spring', WikiLeaks etc). But this actually proved to be
  a nadir. The vitality on display was a product of the preceding era of the
  natural growth of the Web ecosystem.

  This decline in quality should be apparent to any reflective user:

  - the saturation of advertising to the point where many websites are unusable
  - the confection of low-quality content to game 'organic' search rankings
  - the surveillance of users across sites and devices to enable the extraction of
    profitable marketing data
  - the censorship of political content for the 'violation' of bogus terms of use
    on social media platforms if it does not the serve the broader interests of
    capital and western imperialism
  - the saturation of pornography and dehumanising media more generally

  Thbs has also involved the reshaping of Internet users themselves, from active
  and independent _agents_, to drone-like passive _consumers_ of drivel engineered
  to maximise 'engagement' (the monopolisation of attention), where users are like
  the viewers of _Infinite Jest_. See, e.g TikTok and its clones.

  There are many further points that can be made and ideas that can be
  extrapolated from this. Two examples:

  - the emergence of supposed 'AI' is going to lead to greater content
    homogenisation and the intensification of informational entropy as the
    technological mechanism consists in feeding the regurgitated content of the
    internet back into itself

  - reality itself has become infected by the disease that killed the Web
    (ecocide). The distinction between offline and online is becoming increasingly
    hard to draw (politics - the normalisation and ascendancy of the far right and
    subsequent destabilisation of western states)


path: Batch_processing.md
sortable_path: Batch_processing.md
title: Batch processing
checksum: 9b37ad2702ca729fa1f71b0ece5693e8711ef2f10cd46601aa23242ae92dd22d
created: 2024-11-12 07:13:27.501226554+00:00
modified: 2024-11-12 07:34:48.457649692+00:00
metadata: {"created":"Tuesday, November 12, 2024","tags":["computer-history"]}
lead:
  With modern computer systems programs can be executed continuously and as
  needed. With earlier computers (e.g. mainframes or mini-computers that were
  shared by multiple users throughout an organisation) operating on this basis
  would be expensive and would squander resources. It would also be inefficient
  because computers needed time to warm up and cool down between operations.

body:
  With modern computer systems programs can be executed continuously and as
  needed. With earlier computers (e.g. mainframes or mini-computers that were
  shared by multiple users throughout an organisation) operating on this basis
  would be expensive and would squander resources. It would also be inefficient
  because computers needed time to warm up and cool down between operations.

  Batch processing meant waiting until the required data for the operation met a
  certain volume or threshold and then running the job. This way all the computer
  resources were used at once instead repeatedly over an extended period.

  Running operations in batch rather than in real-time also meant you could time
  when you used the computer, running your jobs during off-peak hours when more
  resources would be available. Particularly beneficial during the era of
  time-sharing.

raw_content:
  ---
  tags: [computer-history]
  created: Tuesday, November 12, 2024
  ---

  # Batch processing

  With modern computer systems programs can be executed continuously and as
  needed. With earlier computers (e.g. mainframes or mini-computers that were
  shared by multiple users throughout an organisation) operating on this basis
  would be expensive and would squander resources. It would also be inefficient
  because computers needed time to warm up and cool down between operations.

  Batch processing meant waiting until the required data for the operation met a
  certain volume or threshold and then running the job. This way all the computer
  resources were used at once instead repeatedly over an extended period.

  Running operations in batch rather than in real-time also meant you could time
  when you used the computer, running your jobs during off-peak hours when more
  resources would be available. Particularly beneficial during the era of
  time-sharing.


path: Usenet.md
sortable_path: Usenet.md
title: Usenet
checksum: 2445b5be1ea783e6fd2700023528ec68df8054271bc568eedd5f0601ba5f3c69
created: 2024-11-12 07:36:26.966774102+00:00
modified: 2024-11-12 08:26:14.724821538+00:00
metadata: {"created":"Tuesday, November 12, 2024","tags":["networks","internet"]}
lead:
  A decentralised system of computer servers that allowed users to post messages
  to topic-based discussion groups called "newsgroups" which other users could
  read and reply to.

body:
  A decentralised system of computer servers that allowed users to post messages
  to topic-based discussion groups called "newsgroups" which other users could
  read and reply to.

  Arguably the first social network and the oldest internet network that is still
  operational.

  It was designed by staff at two separate universities. Both used Unix systems
  and wanted a way to communicate with each other.

  ## Technology

  Usenet comprised a [distributed network](385af4b4_Baran_distributed_networks.md)
  of dedicated servers that exchanged messages over the **Network News Transfer
  Protocol** (NNTP).

  A user would post a message to their local news server. The server would assign
  it a UUID and then share it with other peer servers that it was connected to,
  who would also share it, repeating the process. This created a ripple effect
  that would propagate the message over the global network. Because of the
  distributed nature of this network it meant that messages would have a high
  longevity and retention rate and that it was effectively impossible to delete a
  message once posted, since it would be stored across a multitude of servers.

  ## Relation to the Internet

  Usenet developed separately and in parallel with the Internet. Originally it did
  not operate over the Internet: servers would connect to each other over phone
  lines using the Unix-to-Unix Copy Protocol. In the late 1980s when the Internet
  became more widespread and not just limited to DARPA-adjacent universities,
  Usenet transitioned to running over
  [TCP/IP](Transport_Layer_of_Internet_Protocol.md) networks.

  ## Newsgroup hierarchy

  Usenet used a structured, dot-separated naming system for newsgroups that got
  more specific with each subdivision, e.g:

  - comp.sys.mac
  - sci.physics.particle
  - alt.music.nirvana

  Users would subscribe to the newsgroups that interested them and their
  newsreader (which connected to the servers) would only download messages from
  these groups.

  ## Influence

  - Created the concept of threaded discussions in its reply structure
  - Reddit appropriated the concept of topic-based communities in its sub-reddits
    and also used threading
  - RSS adopted Usenet's model of subscribing to specific information sources and
    getting updates: the concept of "pulling" new content from feeds mirrors how
    newsreaders worked
  - Distributed social networks like Mastodon/ActivityPub use a similar
    server-to-server propagation model that Usenet pioneered
  - [BitTorrent's](Torrenting.md) distributed file-sharing model has similarities
    to how binary files were distributed across Usenet servers

  ## "Eternal September"

  For most of its early history Usenet was limited to university students whose
  university was part of the network. Each September new students would join the
  university and this led to an influx of inexperienced Usenet users who didn't
  yet know the etiquette and culture. They would have to be schooled and inducted.

  In the mid-1980s Usenet became accessible to the general public as ISPs started
  granting access. In 1993-1994, AOL granted access to subscribers. This changed
  the nature of discussions from primarily academic and technical topics to
  include more general interest and entertainment content, leading to the creation
  of the "alt." hierarchy which allowed anyone to create new newsgroups without
  formal approval processes that were required in the traditional hierarchies.
  Hence it was "always September".

  This phrase is often used as a shorthand for the way in which the Internet and
  Web has moved from a niche community of technical users to a demotic public
  space with an attendant decline in perceived value.

raw_content:
  ---
  tags: [networks, internet]
  created: Tuesday, November 12, 2024
  ---

  # Usenet

  A decentralised system of computer servers that allowed users to post messages
  to topic-based discussion groups called "newsgroups" which other users could
  read and reply to.

  Arguably the first social network and the oldest internet network that is still
  operational.

  It was designed by staff at two separate universities. Both used Unix systems
  and wanted a way to communicate with each other.

  ## Technology

  Usenet comprised a [distributed network](385af4b4_Baran_distributed_networks.md)
  of dedicated servers that exchanged messages over the **Network News Transfer
  Protocol** (NNTP).

  A user would post a message to their local news server. The server would assign
  it a UUID and then share it with other peer servers that it was connected to,
  who would also share it, repeating the process. This created a ripple effect
  that would propagate the message over the global network. Because of the
  distributed nature of this network it meant that messages would have a high
  longevity and retention rate and that it was effectively impossible to delete a
  message once posted, since it would be stored across a multitude of servers.

  ## Relation to the Internet

  Usenet developed separately and in parallel with the Internet. Originally it did
  not operate over the Internet: servers would connect to each other over phone
  lines using the Unix-to-Unix Copy Protocol. In the late 1980s when the Internet
  became more widespread and not just limited to DARPA-adjacent universities,
  Usenet transitioned to running over
  [TCP/IP](Transport_Layer_of_Internet_Protocol.md) networks.

  ## Newsgroup hierarchy

  Usenet used a structured, dot-separated naming system for newsgroups that got
  more specific with each subdivision, e.g:

  - comp.sys.mac
  - sci.physics.particle
  - alt.music.nirvana

  Users would subscribe to the newsgroups that interested them and their
  newsreader (which connected to the servers) would only download messages from
  these groups.

  ## Influence

  - Created the concept of threaded discussions in its reply structure
  - Reddit appropriated the concept of topic-based communities in its sub-reddits
    and also used threading
  - RSS adopted Usenet's model of subscribing to specific information sources and
    getting updates: the concept of "pulling" new content from feeds mirrors how
    newsreaders worked
  - Distributed social networks like Mastodon/ActivityPub use a similar
    server-to-server propagation model that Usenet pioneered
  - [BitTorrent's](Torrenting.md) distributed file-sharing model has similarities
    to how binary files were distributed across Usenet servers

  ## "Eternal September"

  For most of its early history Usenet was limited to university students whose
  university was part of the network. Each September new students would join the
  university and this led to an influx of inexperienced Usenet users who didn't
  yet know the etiquette and culture. They would have to be schooled and inducted.

  In the mid-1980s Usenet became accessible to the general public as ISPs started
  granting access. In 1993-1994, AOL granted access to subscribers. This changed
  the nature of discussions from primarily academic and technical topics to
  include more general interest and entertainment content, leading to the creation
  of the "alt." hierarchy which allowed anyone to create new newsgroups without
  formal approval processes that were required in the traditional hierarchies.
  Hence it was "always September".

  This phrase is often used as a shorthand for the way in which the Internet and
  Web has moved from a niche community of technical users to a demotic public
  space with an attendant decline in perceived value.


path: SQLite.md
sortable_path: SQLite.md
title: SQLite
lead: ## Enabling foreign key constraints
checksum: 2eb67715c75bdedf756b1e5b91c55501863d3698d1c868a22f736eda6d9055ec
created: 2024-11-13 18:12:28.941320219+00:00
modified: 2024-12-27 15:08:29.205514805+00:00
metadata: {"created":"Wednesday, November 13, 2024","tags":["databases","SQL","SQLite"]}
body:
  ## Enabling foreign key constraints

  Foreign key constraints are not enabled by default - it is very permissive. You
  must manually turn them on, as part of the connection process:

  ```py
  connection = sqlite3.connect("my_database.db")
  connection.execute("PRAGMA foreign_keys = ON")
  ```

  ## INSERT OR IGNORE INTO

  If table has a `UNIQUE` constraint on a field, insert if it is unique otherwise
  skip without throwing a constraint error.

  ```sql
  INSERT OR IGNORE INTO table_name (value) VALUES (:value)
  ```

  ## exec and fetchall

  For `CREATE`, `INSERT`, `UPDATE`, `DELETE` operations it is sufficient to simply
  use `execute` to carry out the operations:

  ```py
  cursor = connection.cursor()
  cursor.execute(sql)
  ```

  For `SELECT` operations, you must add a return statement that uses `fetchall`:

  ```py
  sql = "SELECT * FROM table"
  cursor = connection.cursor()
  cursor.execute(sql)
  return cursor.fetchall()
  ```

  ## SELECT response data type

  A `SELECT` operation returns a [list](Lists_in_Python.md) of
  [tuples](Tuples_in_Python.md) where each entry in the tuple is a returned field.

  For example:

  ```py
  entries_sql = "SELECT title, size FROM entries"

  entries_response = cursor.execute(entries_sql)
  print(cursor.fetchall())
  # [('Lorem ipsum', 127), ('Dolar sit', 4231)]
  ```

raw_content:
  ---
  tags: [databases, SQL, SQLite]
  created: Wednesday, November 13, 2024
  ---

  # SQLite

  ## Enabling foreign key constraints

  Foreign key constraints are not enabled by default - it is very permissive. You
  must manually turn them on, as part of the connection process:

  ```py
  connection = sqlite3.connect("my_database.db")
  connection.execute("PRAGMA foreign_keys = ON")
  ```

  ## INSERT OR IGNORE INTO

  If table has a `UNIQUE` constraint on a field, insert if it is unique otherwise
  skip without throwing a constraint error.

  ```sql
  INSERT OR IGNORE INTO table_name (value) VALUES (:value)
  ```

  ## exec and fetchall

  For `CREATE`, `INSERT`, `UPDATE`, `DELETE` operations it is sufficient to simply
  use `execute` to carry out the operations:

  ```py
  cursor = connection.cursor()
  cursor.execute(sql)
  ```

  For `SELECT` operations, you must add a return statement that uses `fetchall`:

  ```py
  sql = "SELECT * FROM table"
  cursor = connection.cursor()
  cursor.execute(sql)
  return cursor.fetchall()
  ```

  ## SELECT response data type

  A `SELECT` operation returns a [list](Lists_in_Python.md) of
  [tuples](Tuples_in_Python.md) where each entry in the tuple is a returned field.

  For example:

  ```py
  entries_sql = "SELECT title, size FROM entries"

  entries_response = cursor.execute(entries_sql)
  print(cursor.fetchall())
  # [('Lorem ipsum', 127), ('Dolar sit', 4231)]
  ```


path: Terraform.md
sortable_path: Terraform.md
title: Terraform
lead: ## Authentication
checksum: 389c99f29af9b45f5cfbb202a791cf8718bb9492927bac18062032aaf822e9fe
created: 2024-11-16 15:05:11.481499315+00:00
modified: 2024-11-17 11:45:30.497508673+00:00
metadata: {"created":"Saturday, November 16, 2024","tags":["AWS","IaC"]}
body:
  ## Authentication

  Terraform will default to the currently active AWS user providing you have your
  [AWS credentials](/zk/AWS_CLI.md) set-up.

  ## Creating resources

  > Resources are specified in the `main.tf` file.

  Create a new S3 bucket:

  ```hcl
  resource "aws_s3_bucket" "my_new_bucket" {
      bucket = "my-new-bucket"
  }
  ```

  At this point the resource doesn't exist so there is no ARN or ID. When the
  resource is created (through `terraform apply`) Terraform receives this info
  from AWS and store it in a state file.

  This info can be retrieved with `terraform show`, e.g:

  ```
  resource "aws_s3_bucket" "my_new_bucket" {
      id                    = "my-new-bucket"
      arn                   = "arn:aws:s3:::my-new-bucket"
      bucket                = "my-new-bucket"
      bucket_domain_name    = "my-new-bucket.s3.amazonaws.com"
   }

  ```

  ## Standard sequence

  Make your `terraform` directory, then `cd` and:

  ### Initialise project

  ```
  terraform init
  ```

  This will create the file `.terraform.lock.hcl` which should be committed. Stuff
  in `.terraform/` can be git-ignored.

  ### Check changes

  ```
  terraform plan
  ```

  Providing you have written a `main.tf`. The command will list the proposed
  changes to your resources.

  ### Apply changes

  ```
  terraform apply
  ```

  ### Destroy the resource

  Typically when you want to do a clean recreate.

  ```
  terraform destoy
  ```

  ## Run with debug/logger

  ```
  TF_LOG=DEBUG terraform apply
  ```

  Or use with other Terraform command, e.g. `destroy`, `refresh` - whatever is
  causing the problem.

raw_content:
  ---
  tags: [AWS, IaC]
  created: Saturday, November 16, 2024
  ---

  # Terraform

  ## Authentication

  Terraform will default to the currently active AWS user providing you have your
  [AWS credentials](/zk/AWS_CLI.md) set-up.

  ## Creating resources

  > Resources are specified in the `main.tf` file.

  Create a new S3 bucket:

  ```hcl
  resource "aws_s3_bucket" "my_new_bucket" {
      bucket = "my-new-bucket"
  }
  ```

  At this point the resource doesn't exist so there is no ARN or ID. When the
  resource is created (through `terraform apply`) Terraform receives this info
  from AWS and store it in a state file.

  This info can be retrieved with `terraform show`, e.g:

  ```
  resource "aws_s3_bucket" "my_new_bucket" {
      id                    = "my-new-bucket"
      arn                   = "arn:aws:s3:::my-new-bucket"
      bucket                = "my-new-bucket"
      bucket_domain_name    = "my-new-bucket.s3.amazonaws.com"
   }

  ```

  ## Standard sequence

  Make your `terraform` directory, then `cd` and:

  ### Initialise project

  ```
  terraform init
  ```

  This will create the file `.terraform.lock.hcl` which should be committed. Stuff
  in `.terraform/` can be git-ignored.

  ### Check changes

  ```
  terraform plan
  ```

  Providing you have written a `main.tf`. The command will list the proposed
  changes to your resources.

  ### Apply changes

  ```
  terraform apply
  ```

  ### Destroy the resource

  Typically when you want to do a clean recreate.

  ```
  terraform destoy
  ```

  ## Run with debug/logger

  ```
  TF_LOG=DEBUG terraform apply
  ```

  Or use with other Terraform command, e.g. `destroy`, `refresh` - whatever is
  causing the problem.


path: Bash_file_exists.md
sortable_path: Bash_file_exists.md
title: Bash file exists
checksum: 0e5b993b84d6938d458194bd0f7727110ddcdf0c9c2bae79156a67527ec41d9d
created: 2024-11-17 11:46:48.437505596+00:00
modified: 2024-11-17 15:07:20.621890261+00:00
metadata: {"created":"Sunday, November 17, 2024","tags":["shell"]}
lead:
  ```bash
  FILE_PATH="$PWD/foo/bar.json"
  if [ ! -f "$FILE_PATH" ]; then
  	echo -e "ERROR Graph file ( $FILE_PATH ) does not exist. Exiting."
  	exit 0
  fi
  ```

body:
  ```bash
  FILE_PATH="$PWD/foo/bar.json"
  if [ ! -f "$FILE_PATH" ]; then
  	echo -e "ERROR Graph file ( $FILE_PATH ) does not exist. Exiting."
  	exit 0
  fi
  ```

raw_content:
  ---
  tags: [shell]
  created: Sunday, November 17, 2024
  ---

  # Bash file exists

  ```bash
  FILE_PATH="$PWD/foo/bar.json"
  if [ ! -f "$FILE_PATH" ]; then
  	echo -e "ERROR Graph file ( $FILE_PATH ) does not exist. Exiting."
  	exit 0
  fi
  ```


path: Bash_colour_output.md
sortable_path: Bash_colour_output.md
title: Bash colour output
lead: Define colours:
checksum: 4eb8a64d547a1eff1e99e0ff1fa35449d6abb963a2610540a25d576d0662ceac
created: 2024-11-17 11:49:04.660212914+00:00
modified: 2025-02-08 20:08:44.878468586+00:00
metadata: {"created":"Sunday, November 17, 2024","tags":["shell"]}
body:
  Define colours:

  ```bash
  RED='\033[0;31m'
  GREEN='\033[0;32m'
  BLUE='\033[0;34m'
  NO_COLOR='\033[0m'
  ```

  Interpolate in string:

  ```bash
  echo -e "${BLUE}INFO Uploading graph file...${NO_COLOR}"
  ```

  Note: must end with the blank colour otherwise everything subsequent will be in
  blue.

raw_content:
  ---
  tags: [shell]
  created: Sunday, November 17, 2024
  ---

  # Bash colour output

  Define colours:

  ```bash
  RED='\033[0;31m'
  GREEN='\033[0;32m'
  BLUE='\033[0;34m'
  NO_COLOR='\033[0m'
  ```

  Interpolate in string:

  ```bash
  echo -e "${BLUE}INFO Uploading graph file...${NO_COLOR}"
  ```

  Note: must end with the blank colour otherwise everything subsequent will be in
  blue.


path: Bash_store_status_of_command_execution.md
sortable_path: Bash_store_status_of_command_execution.md
title: Bash store status of command execution
checksum: 224d99ee81dd46f5dd86f7d3909c5af9e79564dad5bbc32bff669259ea70a6f7
created: 2024-11-17 11:52:00.945353278+00:00
modified: 2024-11-17 15:07:07.868344074+00:00
metadata: {"created":"Sunday, November 17, 2024","tags":["shell","AWS","S3"]}
lead:
  We can store the outcome of a command in a variable, then check this variable to
  derive the status and then provide custom outputs or other branching logic.

body:
  We can store the outcome of a command in a variable, then check this variable to
  derive the status and then provide custom outputs or other branching logic.

  Here is an example of adding an object to a bucket in S3:

  ```bash
  aws s3api put-object --bucket "${BUCKET_NAME}" --key "${FILE}" --body "${FILE_PATH}" >/dev/null 2>&1
  STATUS=$?

  if [ $STATUS -eq 0 ]; then
  	echo -e "SUCCESS File uploaded."
  else
  	echo -e "Upload failed with status $STATUS."
  fi
  ```

raw_content:
  ---
  tags: [shell, AWS, S3]
  created: Sunday, November 17, 2024
  ---

  # Bash store status of command execution

  We can store the outcome of a command in a variable, then check this variable to
  derive the status and then provide custom outputs or other branching logic.

  Here is an example of adding an object to a bucket in S3:

  ```bash
  aws s3api put-object --bucket "${BUCKET_NAME}" --key "${FILE}" --body "${FILE_PATH}" >/dev/null 2>&1
  STATUS=$?

  if [ $STATUS -eq 0 ]; then
  	echo -e "SUCCESS File uploaded."
  else
  	echo -e "Upload failed with status $STATUS."
  fi
  ```


path: Bauman_quote.md
sortable_path: Bauman_quote.md
title: Bauman quote
checksum: 6f4b7b7158946e4696ece1fe7fe94e28c690fef353fed8fb54ab7abd91ad24d4
created: 2024-11-19 17:35:01.869241943+00:00
modified: 2024-12-01 19:45:51.094616521+00:00
metadata: {"created":"Tuesday, November 19, 2024","tags":["ecopolsoc","surveillance-capitalism"]}
lead:
  _The yawning gap between the right of self-assertion and the capacity to control
  the social settings which render such self-assertion feasible. It is from that
  abysmal gap that the most poisonous effluvia contaminating the lives of
  contemporary individuals emanate_.

body:
  _The yawning gap between the right of self-assertion and the capacity to control
  the social settings which render such self-assertion feasible. It is from that
  abysmal gap that the most poisonous effluvia contaminating the lives of
  contemporary individuals emanate_.

  Quoted in _The Age of Surveillance Capitalism_ (2019): 45

raw_content:
  ---
  tags: [ecopolsoc, surveillance-capitalism]
  created: Tuesday, November 19, 2024
  ---

  # Bauman quote

  _The yawning gap between the right of self-assertion and the capacity to control
  the social settings which render such self-assertion feasible. It is from that
  abysmal gap that the most poisonous effluvia contaminating the lives of
  contemporary individuals emanate_.

  Quoted in _The Age of Surveillance Capitalism_ (2019): 45


path: AWS_SQS.md
sortable_path: AWS_SQS.md
title: AWS SQS
checksum: 8fc99f527cb7d66f20b0bed1b5c9df452740c9d316d7c9c356990b0755abf72d
created: 2024-11-22 17:22:10.666427159+00:00
modified: 2024-11-25 06:50:57.193178069+00:00
metadata: {"tags":["AWS","SQS"]}
lead:
  SQS ("Simple Queue Service") is a service that allows you to send, store and
  receive messages between apps and software components built in AWS. It helps
  with decoupling and scaling.

body:
  SQS ("Simple Queue Service") is a service that allows you to send, store and
  receive messages between apps and software components built in AWS. It helps
  with decoupling and scaling.

  > Amazon SQS is a distributed queue system that enables web service applications
  > to quickly and reliably queue messages that one component in the application
  > generates to be consumed by another component where a queue is a temporary
  > repository for messages that are awaiting processing.

  As the name indicates, its operating mode is that of a [queue](Queue.md) data
  structure offering first-in, first-out and other queue implementations.

  ## Example use case

  ![SQS example diagram](../img/SQS-example.png)

  A request is made to an [API Gateway](API_Gateway.md) endpoint with a body. The
  body is then parsed and inserted into a database.

  The benefit of adding SQS as a buffer between the request and the updating of
  the database:

  - It can better handle spikes in activity, buffering requests to the database
    until it is ready to handle them. This prevents the messages getting lost if
    the server is overloaded

  - There is a retry mechanism built into SQS. If the database write fails, the
    message stays in the queue allowing for retries

  - It facilitates decoupling. Without SQS as the middleman the responsibilites of
    the lambda would be compounded - it would receive requests and update the DB,
    plus any additional processes such sending a message to SNS. In the solution
    we have two lambdas co-ordinating actions in a decouped manner via SQS.

  ## Dead letters

  As SQS allows for multiple retries we could end up in a situation where a
  malformed message is continually processed in a loop. To avoid this you can set
  a maxiumum retry limit and, when this is exceeded, shift the problematic message
  to the dead letter queue (DLQ) and remove it from the main queue.

  ![SQS deadletter example](../img/SQS-deadletter.png)

  If the DLQ reaches a certain threshold this can trigger additional handling such
  as raising an Alert in [CloudWatch](./AWS_CloudWatch.md) or other monitoring
  tool.

  Note that a DLQ is not a distinct entity within the SDK, it is just another SQS
  queue that is designated to store failures.

  See [AWS SDK Syntax](AWS_SQS_SDK.md).

raw_content:
  ---
  tags: [AWS, SQS]
  ---

  # AWS SQS

  SQS ("Simple Queue Service") is a service that allows you to send, store and
  receive messages between apps and software components built in AWS. It helps
  with decoupling and scaling.

  > Amazon SQS is a distributed queue system that enables web service applications
  > to quickly and reliably queue messages that one component in the application
  > generates to be consumed by another component where a queue is a temporary
  > repository for messages that are awaiting processing.

  As the name indicates, its operating mode is that of a [queue](Queue.md) data
  structure offering first-in, first-out and other queue implementations.

  ## Example use case

  ![SQS example diagram](../img/SQS-example.png)

  A request is made to an [API Gateway](API_Gateway.md) endpoint with a body. The
  body is then parsed and inserted into a database.

  The benefit of adding SQS as a buffer between the request and the updating of
  the database:

  - It can better handle spikes in activity, buffering requests to the database
    until it is ready to handle them. This prevents the messages getting lost if
    the server is overloaded

  - There is a retry mechanism built into SQS. If the database write fails, the
    message stays in the queue allowing for retries

  - It facilitates decoupling. Without SQS as the middleman the responsibilites of
    the lambda would be compounded - it would receive requests and update the DB,
    plus any additional processes such sending a message to SNS. In the solution
    we have two lambdas co-ordinating actions in a decouped manner via SQS.

  ## Dead letters

  As SQS allows for multiple retries we could end up in a situation where a
  malformed message is continually processed in a loop. To avoid this you can set
  a maxiumum retry limit and, when this is exceeded, shift the problematic message
  to the dead letter queue (DLQ) and remove it from the main queue.

  ![SQS deadletter example](../img/SQS-deadletter.png)

  If the DLQ reaches a certain threshold this can trigger additional handling such
  as raising an Alert in [CloudWatch](./AWS_CloudWatch.md) or other monitoring
  tool.

  Note that a DLQ is not a distinct entity within the SDK, it is just another SQS
  queue that is designated to store failures.

  See [AWS SDK Syntax](AWS_SQS_SDK.md).


path: JavaScript_module_types.md
sortable_path: JavaScript_module_types.md
title: JavaScript module types
checksum: 32ee0dc1c2405758a7981a08a63258512ef33f621d465370885dd3a057a40eff
created: 2024-11-24 10:32:03.592097816+00:00
modified: 2024-11-24 10:46:32.193244857+00:00
metadata: {"created":"Sunday, November 24, 2024","tags":["javascript"]}
lead:
  The following info is useful when you wish to use modern JavaScript tooling
  outside of a build system.

body:
  The following info is useful when you wish to use modern JavaScript tooling
  outside of a build system.

  For instance I wanted to use a bundled React application in a static website not
  created using NPM.

  Great account by
  [Julia Evans](https://jvns.ca/blog/2024/11/18/how-to-import-a-javascript-library/).

  In essence there are three main module formats:

  - CommonJS

    - Native Node JS module system using `require()` and `module.exports()`

  - ESModules

    - The defacto standard that works in both the browser and Node.js

  - AMD

    - A browser-friendly version of CommonJS since superseded by ESModules

  Then there is UMD, _Universal Module Definition_. This is a wrapper that
  combines compatibility for multiple module systems and works with AMD, CommonJS,
  as well as global variables.

raw_content:
  ---
  tags: [javascript]
  created: Sunday, November 24, 2024
  ---

  # JavaScript module types

  The following info is useful when you wish to use modern JavaScript tooling
  outside of a build system.

  For instance I wanted to use a bundled React application in a static website not
  created using NPM.

  Great account by
  [Julia Evans](https://jvns.ca/blog/2024/11/18/how-to-import-a-javascript-library/).

  In essence there are three main module formats:

  - CommonJS

    - Native Node JS module system using `require()` and `module.exports()`

  - ESModules

    - The defacto standard that works in both the browser and Node.js

  - AMD

    - A browser-friendly version of CommonJS since superseded by ESModules

  Then there is UMD, _Universal Module Definition_. This is a wrapper that
  combines compatibility for multiple module systems and works with AMD, CommonJS,
  as well as global variables.


path: a771a6d9_attributes_of_internet_enclosure.md
sortable_path: a771a6d9_attributes_of_internet_enclosure.md
title: a771a6d9_defining_internet_enclosure
lead: ## Defining _enclosure_
checksum: 18744f42130d70d76167fc467e6607c602071cb923634b0c0a74ce43b3421edb
created: 2024-11-25 06:33:56.472756619+00:00
modified: 2024-11-24 10:52:28.496405398+00:00
metadata: {"created":"Friday, November 22, 2024","tags":["ecopolsoc","internet"]}
body:
  ## Defining _enclosure_

  The attempt by capital interests to encircle, control and contain networked
  digital communication with the object of extracting financial value from the
  exchanges and the community from which they arise.

  This constitutes the commodification of a human-constituted resource, like
  labour rather than a natural resource, like oil.

  ## Main characteristics

  ### Strategic denial of alternative communication media

  Where there is a _multiplicity_ of media and within media, a multiplicity of
  channels, capital steers communication toward a _single_ entity.

  In a "democratic free-market society", capital cannot simply ban alternative
  media, it can however work to diminish the influence of alternatives through the
  strategic denial of interoperability and the aquisition and subsumption of
  rivals into its system.

  ### Tyrannical control of the rules of communication

  Where the standards of communication are elective and established organically
  and collaboratively between peers (possibly even democratically), capital
  enforces rules derived externally and applied in an authoritarian manner. These
  rules are mutable but changes are enacted unilaterally and arbitrarily by the
  owners of the medium, not its users. Hence, tyranny in its technical political
  sense.

  ### Total control of information and content

  Where individuals share information freely in collaborative enterprise with
  diminished concern for ownership (typically favouring citation and iteration as
  models), capital takes full possession of the information generated such that it
  can be removed and destroyed at will without consultation.

  ### Surveillance

  Where communication is anonymised (loosly or strictly (i.e. through
  cryptographic means)), capital _surveils_ all exchanges and the behaviour of
  community members.

  Typically this is not _personal_ in the sense of being interested in the
  specific user's identity, rather it is abstracted into a composite of the
  person's preferences which may or may not disclose their legal identity (i.e
  metadata).

  This characteristic is both an _attribute_ of internet enclosure and its
  ultimate reason for existence. It is critical to the mechanism of extraction
  since it provides both data that can be sold to other capital interests and
  content that can be used to sell to community members as consumers.

  ### Artificial promotion of commercial content and prolongation of engagement

  Where engagement with media is idiosyncratic and organic, capital circumscribes
  the field. This is done to prolong engagement.

  At one pole this is achieved through the excitation of visceral responses by
  artificially favouring content that titillates, disgusts or angers the user. At
  the other, it is achieved through mollification and the coddling of the user.
  The user encounters only like-minded fellows who affirm and repeat his existing
  beliefs and values, creating community and a sense of safety through the
  othering of contrary viewpoints. Both techniques are demagogic in nature
  familiar from the control mechanisms of cults and extreme political ideologies.

raw_content:
  ---
  tags: [ecopolsoc, internet]
  created: Friday, November 22, 2024
  ---

  # a771a6d9_defining_internet_enclosure

  ## Defining _enclosure_

  The attempt by capital interests to encircle, control and contain networked
  digital communication with the object of extracting financial value from the
  exchanges and the community from which they arise.

  This constitutes the commodification of a human-constituted resource, like
  labour rather than a natural resource, like oil.

  ## Main characteristics

  ### Strategic denial of alternative communication media

  Where there is a _multiplicity_ of media and within media, a multiplicity of
  channels, capital steers communication toward a _single_ entity.

  In a "democratic free-market society", capital cannot simply ban alternative
  media, it can however work to diminish the influence of alternatives through the
  strategic denial of interoperability and the aquisition and subsumption of
  rivals into its system.

  ### Tyrannical control of the rules of communication

  Where the standards of communication are elective and established organically
  and collaboratively between peers (possibly even democratically), capital
  enforces rules derived externally and applied in an authoritarian manner. These
  rules are mutable but changes are enacted unilaterally and arbitrarily by the
  owners of the medium, not its users. Hence, tyranny in its technical political
  sense.

  ### Total control of information and content

  Where individuals share information freely in collaborative enterprise with
  diminished concern for ownership (typically favouring citation and iteration as
  models), capital takes full possession of the information generated such that it
  can be removed and destroyed at will without consultation.

  ### Surveillance

  Where communication is anonymised (loosly or strictly (i.e. through
  cryptographic means)), capital _surveils_ all exchanges and the behaviour of
  community members.

  Typically this is not _personal_ in the sense of being interested in the
  specific user's identity, rather it is abstracted into a composite of the
  person's preferences which may or may not disclose their legal identity (i.e
  metadata).

  This characteristic is both an _attribute_ of internet enclosure and its
  ultimate reason for existence. It is critical to the mechanism of extraction
  since it provides both data that can be sold to other capital interests and
  content that can be used to sell to community members as consumers.

  ### Artificial promotion of commercial content and prolongation of engagement

  Where engagement with media is idiosyncratic and organic, capital circumscribes
  the field. This is done to prolong engagement.

  At one pole this is achieved through the excitation of visceral responses by
  artificially favouring content that titillates, disgusts or angers the user. At
  the other, it is achieved through mollification and the coddling of the user.
  The user encounters only like-minded fellows who affirm and repeat his existing
  beliefs and values, creating community and a sense of safety through the
  othering of contrary viewpoints. Both techniques are demagogic in nature
  familiar from the control mechanisms of cults and extreme political ideologies.


path: AWS_SQS_SDK.md
sortable_path: AWS_SQS_SDK.md
title: AWS SQS SDK
lead: ## Initialising the SQS client
checksum: b721c137c34d710b811bc81e027c3913e17579210602c6cd6870bbbac5751496
created: 2024-11-25 06:33:56.480592735+00:00
modified: 2024-11-25 06:50:09.432367712+00:00
metadata: {"created":"Monday, November 25, 2024","tags":["AWS","SQS"]}
body:
  ## Initialising the SQS client

  ```ts
  import { SQSClient } from "@aws-sdk/client-sqs";

  const sqs = new SQSClient({ region: "us-east-1" });
  ```

  ## Sending a message to the queue

  ```ts
  import { SendMessageCommand } from "@aws-sdk/client-sqs";

  const command = new SendMessageCommand({
    QueueUrl: queueUrl,
    MessageBody: messageBody,
    // Optional parameters
    DelaySeconds: 0,
    MessageAttributes: {
      CustomAttribute: {
        DataType: "String",
        StringValue: "CustomValue",
      },
    },
  });

  return await sqs.send(command);
  ```

  ## Processing messages on the queue

  ```ts
  import { ReceiveMessageCommand } from "@aws-sdk/client-sqs";

  const command = new ReceiveMessageCommand({
    QueueUrl: queueUrl,
    MaxNumberOfMessages: 10,
    WaitTimeSeconds: 20, // Long polling
    VisibilityTimeout: 30, // Time other consumers won't see this message
  });

  const response = await sqs.send(command);

  // Then do something

  for (const message of response.Messages || []) {
    console.log(message);
  }
  ```

  ## Removing message from queue

  ```ts
  import { DeleteMessageCommand } from "@aws-sdk/client-sqs";

  for (const message of response.Messages || []) {
    await sqs.send(
      new DeleteMessageCommand({
        QueueUrl: queueUrl,
        ReceiptHandle: message.ReceiptHandle,
      }),
    );
  }
  ```

  ## Query a DLQ

  ```ts
  const checkDLQ = async (dlqUrl: string) => {
    const command = new GetQueueAttributesCommand({
      QueueUrl: dlqUrl,
      AttributeNames: ["ApproximateNumberOfMessages"],
    });

    const response = await sqs.send(command);
    return response.Attributes?.ApproximateNumberOfMessages;
  };
  ```

raw_content:
  ---
  tags: [AWS, SQS]
  created: Monday, November 25, 2024
  ---

  # AWS SQS SDK

  ## Initialising the SQS client

  ```ts
  import { SQSClient } from "@aws-sdk/client-sqs";

  const sqs = new SQSClient({ region: "us-east-1" });
  ```

  ## Sending a message to the queue

  ```ts
  import { SendMessageCommand } from "@aws-sdk/client-sqs";

  const command = new SendMessageCommand({
    QueueUrl: queueUrl,
    MessageBody: messageBody,
    // Optional parameters
    DelaySeconds: 0,
    MessageAttributes: {
      CustomAttribute: {
        DataType: "String",
        StringValue: "CustomValue",
      },
    },
  });

  return await sqs.send(command);
  ```

  ## Processing messages on the queue

  ```ts
  import { ReceiveMessageCommand } from "@aws-sdk/client-sqs";

  const command = new ReceiveMessageCommand({
    QueueUrl: queueUrl,
    MaxNumberOfMessages: 10,
    WaitTimeSeconds: 20, // Long polling
    VisibilityTimeout: 30, // Time other consumers won't see this message
  });

  const response = await sqs.send(command);

  // Then do something

  for (const message of response.Messages || []) {
    console.log(message);
  }
  ```

  ## Removing message from queue

  ```ts
  import { DeleteMessageCommand } from "@aws-sdk/client-sqs";

  for (const message of response.Messages || []) {
    await sqs.send(
      new DeleteMessageCommand({
        QueueUrl: queueUrl,
        ReceiptHandle: message.ReceiptHandle,
      }),
    );
  }
  ```

  ## Query a DLQ

  ```ts
  const checkDLQ = async (dlqUrl: string) => {
    const command = new GetQueueAttributesCommand({
      QueueUrl: dlqUrl,
      AttributeNames: ["ApproximateNumberOfMessages"],
    });

    const response = await sqs.send(command);
    return response.Attributes?.ApproximateNumberOfMessages;
  };
  ```


path: AWS_SNS.md
sortable_path: AWS_SNS.md
title: AWS SNS
checksum: f12c6513eaba9963248094d422b8c2e20f6c393909a60ba34a4a7721b52e9f7c
created: 2024-11-25 06:50:32.993088026+00:00
modified: 2024-11-25 07:19:10.056124501+00:00
metadata: {"created":"Monday, November 25, 2024","tags":["AWS","SNS","SQS"]}
lead:
  The Simple Notification Service is another form of messaging service in AWS,
  similar to [SQS](AWS_SQS.md). The key difference is that SNS pushes messages out
  to subscribers whereas SQS stores the messages until they are processed.

body:
  The Simple Notification Service is another form of messaging service in AWS,
  similar to [SQS](AWS_SQS.md). The key difference is that SNS pushes messages out
  to subscribers whereas SQS stores the messages until they are processed.

  Before a message can be sent, and SNS topic must exist. One service such as a
  lambda will _publish_ to this topic. Another service, will _subscribe_ to the
  topic and be alerted when a message is sent to it.

  With SNS, one message can be sent to multiple subscribers simultaneously. In
  addition there is message filtering at the subscription level so subscribers can
  choose to receive only the messages they are interested in.

  Many other AWS services can act as SNS subscribers. Some common examples:

  - SQS queues
  - Lambda functions (trigger on receipt of a message)
  - HTTP endpoints
  - Email/SMS/Push notifications to mobile apps

  ## Combining with SQS

  Utilising SNS with SQS is a common pattern in serverless applications.

  We use SNS to decouple publishers from subscribers and then use SQS to handle
  the different subscriber tasks. This is known as the "Fanout-Queue" pattern.

  ![SQS fanout pattern](../img/sns-example.png)

  For example, an order is placed which results in a publication event to an SNS
  topic.

  Multiple systems subscribe to this topic, e.g. an inventory system, a shipping
  system and an analytics system.

  Each system has its own queue for processing the message.

raw_content:
  ---
  tags: [AWS, SNS, SQS]
  created: Monday, November 25, 2024
  ---

  # AWS SNS

  The Simple Notification Service is another form of messaging service in AWS,
  similar to [SQS](AWS_SQS.md). The key difference is that SNS pushes messages out
  to subscribers whereas SQS stores the messages until they are processed.

  Before a message can be sent, and SNS topic must exist. One service such as a
  lambda will _publish_ to this topic. Another service, will _subscribe_ to the
  topic and be alerted when a message is sent to it.

  With SNS, one message can be sent to multiple subscribers simultaneously. In
  addition there is message filtering at the subscription level so subscribers can
  choose to receive only the messages they are interested in.

  Many other AWS services can act as SNS subscribers. Some common examples:

  - SQS queues
  - Lambda functions (trigger on receipt of a message)
  - HTTP endpoints
  - Email/SMS/Push notifications to mobile apps

  ## Combining with SQS

  Utilising SNS with SQS is a common pattern in serverless applications.

  We use SNS to decouple publishers from subscribers and then use SQS to handle
  the different subscriber tasks. This is known as the "Fanout-Queue" pattern.

  ![SQS fanout pattern](../img/sns-example.png)

  For example, an order is placed which results in a publication event to an SNS
  topic.

  Multiple systems subscribe to this topic, e.g. an inventory system, a shipping
  system and an analytics system.

  Each system has its own queue for processing the message.


path: a247fa9b_surveillance_capitalism_not_necessary.md
sortable_path: a247fa9b_surveillance_capitalism_not_necessary.md
title: a247fa9b_surveillance_capitalism_not_necessary
checksum: 6982996ba7fd461a4139427f331faafde8db2ffe30532126b850a052b8f777d5
created: 2024-12-01 19:09:52.691742335+00:00
modified: 2024-12-01 19:34:56.319205514+00:00
metadata: {"created":"Sunday, December 01, 2024","tags":["ecopolsoc","internet","surveillance-capitalism"]}
lead:
  _Surveillance capitalism is neither a necessary development of information
  capitalism nor a necessary product of digital technology or the internet. It is
  a specifically constructed human choice, an unprecedented market form, an
  original solution to an emergency, and the underlying mechanism through which a
  new asset class is created on the cheap and converted to revenue._

body:
  _Surveillance capitalism is neither a necessary development of information
  capitalism nor a necessary product of digital technology or the internet. It is
  a specifically constructed human choice, an unprecedented market form, an
  original solution to an emergency, and the underlying mechanism through which a
  new asset class is created on the cheap and converted to revenue._

  _The Age of Surveillance Capitalism_ (2019): 91

raw_content:
  ---
  tags: [ecopolsoc, internet, surveillance-capitalism]
  created: Sunday, December 01, 2024
  ---

  # a247fa9b_surveillance_capitalism_not_necessary

  _Surveillance capitalism is neither a necessary development of information
  capitalism nor a necessary product of digital technology or the internet. It is
  a specifically constructed human choice, an unprecedented market form, an
  original solution to an emergency, and the underlying mechanism through which a
  new asset class is created on the cheap and converted to revenue._

  _The Age of Surveillance Capitalism_ (2019): 91


path: fbbfbc32-political-accommodation-inveigelment-surveillance-capitalism.md
sortable_path: fbbfbc32-political-accommodation-inveigelment-surveillance-capitalism.md
title: fbbfbc32-political-accommodation-inveigelment-surveillance-capitalism
checksum: 68352d1a57dcb358ab8a805550c10d8022f50445c03e634f6c38c7cc423fcff6
created: 2024-12-01 19:15:54.90583713+00:00
modified: 2025-01-09 19:03:40.155661978+00:00
metadata: {"created":"Sunday, December 01, 2024","tags":["ecopolsoc","internet","surveillance-capitalism"]}
lead:
  The reason why surveillance capitalism was able to take root when it did was not
  merely down to technological forces. Google, as the originator of the form, was
  able to exploit the political currents of the time to further innoculate itself
  against scrutiny and oversight.

body:
  The reason why surveillance capitalism was able to take root when it did was not
  merely down to technological forces. Google, as the originator of the form, was
  able to exploit the political currents of the time to further innoculate itself
  against scrutiny and oversight.

  The discovery of behavioural surplus coincided with September 11 and the
  subsequent "global war on terror". The quest for domestic "security" led to the
  sweeping erosion of previous generations' privacy rights.

  Prior to 911, the FCC had been arranging a series of legal challenges to Google
  on the question of privacy. This went out the window in the post-911 era where
  Google's unique ability to track and surveil online behaviour became a coveted
  commodity for the intelligence apparatus. Google began working closely with both
  the CIA and the NSA, with the CIA establishing an office and forward base in
  Silicon Valley.

  There was an deep interdependency between the Pentagon, intelligence agencies
  and Google:

  _The US intelligence community's incubation of Google from inception occurred
  through a combination of direct sponsorship and informal networks of financial
  influence, themselves closely aligned with Pentagon interests._

  _The Age of Surveillance Capitalism_ (2019): 118

  Another key aspect was cosying up to politicians during the electoral cycle.
  Most notably during Obama's elections:

  _Google demonstrated that the same predictive knowledge derived from behavioural
  surplus that had made the surveillance capitalists wealthy could also help
  candidates win elections_

  _Ibid_: 122

  Eric Schmidt took an active role in making Google's dataset and technologies
  available to the Obama campaign in both of his elections in order to target
  voters more accurately. He then was swiftly appointed to advisory roles within
  the administration throughout both terms.

raw_content:
  ---
  tags: [ecopolsoc, internet, surveillance-capitalism]
  created: Sunday, December 01, 2024
  ---

  # fbbfbc32-political-accommodation-inveigelment-surveillance-capitalism

  The reason why surveillance capitalism was able to take root when it did was not
  merely down to technological forces. Google, as the originator of the form, was
  able to exploit the political currents of the time to further innoculate itself
  against scrutiny and oversight.

  The discovery of behavioural surplus coincided with September 11 and the
  subsequent "global war on terror". The quest for domestic "security" led to the
  sweeping erosion of previous generations' privacy rights.

  Prior to 911, the FCC had been arranging a series of legal challenges to Google
  on the question of privacy. This went out the window in the post-911 era where
  Google's unique ability to track and surveil online behaviour became a coveted
  commodity for the intelligence apparatus. Google began working closely with both
  the CIA and the NSA, with the CIA establishing an office and forward base in
  Silicon Valley.

  There was an deep interdependency between the Pentagon, intelligence agencies
  and Google:

  _The US intelligence community's incubation of Google from inception occurred
  through a combination of direct sponsorship and informal networks of financial
  influence, themselves closely aligned with Pentagon interests._

  _The Age of Surveillance Capitalism_ (2019): 118

  Another key aspect was cosying up to politicians during the electoral cycle.
  Most notably during Obama's elections:

  _Google demonstrated that the same predictive knowledge derived from behavioural
  surplus that had made the surveillance capitalists wealthy could also help
  candidates win elections_

  _Ibid_: 122

  Eric Schmidt took an active role in making Google's dataset and technologies
  available to the Obama campaign in both of his elections in order to target
  voters more accurately. He then was swiftly appointed to advisory roles within
  the administration throughout both terms.


path: Architecture_of_the_World_Wide_Web.md
sortable_path: Architecture_of_the_World_Wide_Web.md
title: Architecture of the World Wide Web
lead: ## Terms
checksum: 728a7f6d45ae4e59189ac0cb9ee63a5ee7909701f53784f6b2366793efcf8ccc
created: 2024-12-13 13:06:19.172815289+00:00
modified: 2024-12-13 15:16:12.762244333+00:00
metadata: {"created":"Friday, December 13, 2024","tags":["world-wide-web","internet"]}
body:
  ## Terms

  <dl>
  <dt>web</dt>
  <dd>a set of resources delivered over the Internet using the HTTP protocol</dd>

  <dt>web resource</dt>
  <dd>any information that can be accessed using the web (document, image, video)</dd>

  <dt>web server</dt>
  <dd>a software program on a computer that hosts web resources</dd>

  <dt>web browser</dt>
  <dd>an application used to acccess web resources on web servers</dd>

  </dl>

  ## The web is _distributed_, _addressable_, and _linked_

  ### Distributed

  There is no centralised organisation or system that decides the content that can
  be published. Any computer connected to the Internet can run a web server and
  the person running it can make available any content they wish.

  ### _Addressable_

  Every resource on the web has a unique address that includes both its location
  and how to access it (URL):

  ![](../img/web-url.png)

  - scheme
    - specifies the [Application Layer](Application_Layer_of_Internet_Protocol.md for
      accessing the resource. In the example this is HTTP but it could be FTP or another
      protocol, always bracketed with a colon
  - authority
    - comprises the [DNS](Transport_Layer_of_Internet_Protocol.md) hostname of the
      server containing the resource. This could also be an
      [IP address](IP_addresses.md) and could also include a port number
  - path
    - the location of the resource on the web server, organised hierarchically and
      analagous to a file path
  - query
    - a modifier of the resource returned to the client. Its usage varies accross
      sites but is typically deterimined by backend implementation details

  > Note a URL does not have to always contain _all_ this information. Consider an
  > index page.

raw_content:
  ---
  tags: [world-wide-web, internet]
  created: Friday, December 13, 2024
  ---

  # Architecture of the World Wide Web

  ## Terms

  <dl>
  <dt>web</dt>
  <dd>a set of resources delivered over the Internet using the HTTP protocol</dd>

  <dt>web resource</dt>
  <dd>any information that can be accessed using the web (document, image, video)</dd>

  <dt>web server</dt>
  <dd>a software program on a computer that hosts web resources</dd>

  <dt>web browser</dt>
  <dd>an application used to acccess web resources on web servers</dd>

  </dl>

  ## The web is _distributed_, _addressable_, and _linked_

  ### Distributed

  There is no centralised organisation or system that decides the content that can
  be published. Any computer connected to the Internet can run a web server and
  the person running it can make available any content they wish.

  ### _Addressable_

  Every resource on the web has a unique address that includes both its location
  and how to access it (URL):

  ![](../img/web-url.png)

  - scheme
    - specifies the [Application Layer](Application_Layer_of_Internet_Protocol.md for
      accessing the resource. In the example this is HTTP but it could be FTP or another
      protocol, always bracketed with a colon
  - authority
    - comprises the [DNS](Transport_Layer_of_Internet_Protocol.md) hostname of the
      server containing the resource. This could also be an
      [IP address](IP_addresses.md) and could also include a port number
  - path
    - the location of the resource on the web server, organised hierarchically and
      analagous to a file path
  - query
    - a modifier of the resource returned to the client. Its usage varies accross
      sites but is typically deterimined by backend implementation details

  > Note a URL does not have to always contain _all_ this information. Consider an
  > index page.


path: HTTPS.md
sortable_path: HTTPS.md
title: HTTPS
checksum: de6f38cbad0593423c82bdfd4d5202e7b6d9ed4db6bf40055744cef060f7fdea
created: 2024-12-13 13:23:23.159398701+00:00
modified: 2025-02-09 12:54:49.804913564+00:00
lead:
  The problem with standard, unencypted HTTP requests is that the data can be
  captured in transit and be observed or modified by malicious actors.

body:
  The problem with standard, unencypted HTTP requests is that the data can be
  captured in transit and be observed or modified by malicious actors.

  HTTPS is the solution. It encrypts the entirety of the HTTP request and response
  (URL, headers, body).

  It utilises two types of encryption to send messages securely:

  - symmetric encryption
    - a single shared key between client and server to encrypt the messages sent
      between them
  - asymmetric encryption
    - two keys are used: a [public key](./bbdcb54f_public_key_cryptography.md) to
      encrypt the data and a private key to decrypt it. The public key can be
      shared freely so anyone can encrypt and send data to a peer but only the
      peer can receive and decrypt it

  The encryption protocol used is TLS - the **Transport Layer Security Protocol**.
  Previously SSL (Secure Sockets Layer) was used but has been deprecated over
  security concerns.

  ## How communication over HTTPs works

  - An initial handshake is shared between client and server, agreeing that
    communication will be encrypted. This is public. "Client hello" and "Server
    hello". Some random numbers are exchanged at this point
  - The server sends a digital [certificate](./Certificate_authorities.md') key
    The client checks that the certificate is valid
  - If valid, the client encrypts a string of bytes using the public key and sends
    it to the server. This is called the "premaster secret"
  - This is decrypted by the server
  - The premaster secret, along with the random bytes from the handshake is then
    used to compute a shared secret key (symmetric) which is used to encrypt all
    subsequent messages for the duration of the session

raw_content:
  ---
  tags: [world-wide-web, internet, encryption, server-management]
  created: Friday, December 14, 2024
  ---

  # HTTPS

  The problem with standard, unencypted HTTP requests is that the data can be
  captured in transit and be observed or modified by malicious actors.

  HTTPS is the solution. It encrypts the entirety of the HTTP request and response
  (URL, headers, body).

  It utilises two types of encryption to send messages securely:

  - symmetric encryption
    - a single shared key between client and server to encrypt the messages sent
      between them
  - asymmetric encryption
    - two keys are used: a [public key](./bbdcb54f_public_key_cryptography.md) to
      encrypt the data and a private key to decrypt it. The public key can be
      shared freely so anyone can encrypt and send data to a peer but only the
      peer can receive and decrypt it

  The encryption protocol used is TLS - the **Transport Layer Security Protocol**.
  Previously SSL (Secure Sockets Layer) was used but has been deprecated over
  security concerns.

  ## How communication over HTTPs works

  - An initial handshake is shared between client and server, agreeing that
    communication will be encrypted. This is public. "Client hello" and "Server
    hello". Some random numbers are exchanged at this point
  - The server sends a digital [certificate](./Certificate_authorities.md') key
    The client checks that the certificate is valid
  - If valid, the client encrypts a string of bytes using the public key and sends
    it to the server. This is called the "premaster secret"
  - This is decrypted by the server
  - The premaster secret, along with the random bytes from the handshake is then
    used to compute a shared secret key (symmetric) which is used to encrypt all
    subsequent messages for the duration of the session

metadata:
  {"created":"Friday, December 14, 2024","tags":["world-wide-web","internet","encryption","server-management"]}


path: What_can_the_ISP_see.md
sortable_path: What_can_the_ISP_see.md
title: What can the ISP see?
lead: ## Plain HTTP
checksum: 474557f3409d35a1feda6f5efc1f977da43efb349224299d3ffea27eaab931c1
created: 2024-12-13 14:14:32.050396895+00:00
modified: 2024-12-13 14:38:36.367489373+00:00
metadata: {"created":"Friday, December 13, 2024","tags":["internet","encryption","privacy","TOR"]}
body:
  ## Plain HTTP

  The ISP can see all content exchanged: DNS lookups, IP address of the server you
  connect to, requests and body content.

  ## Just HTTPS

  With HTTPS alone, the content of the messages is encrypted but the ISP can see:

  - DNS queries
  - IP addresses you connect to
  - Traffic patterns and metadata (when, how often, amount of data exchanged etc)

  ## HTTPS and encrypted DNS server

  With HTTPS and an encrypted DNS server (e.g. Quad9) the DNS queries are hidden
  but the IP addresses are not. So they could still derive your DNS lookups from
  the IPs you end up connecting to.

  ## HTTPS and VPN

  The ISP only sees the encrypted traffic to the VPN server. Your real IP and
  destination IP is hidden.

  However the VPN provider can potentially see DNS queries, depending on their
  policy. Although a good VPN provider will encrypt DNS lookups like an encrypted
  DNS server.

  The VPN can also still see what IPs you are connecting to. You are basically
  swiching trust from the ISP to the VPN provider. However reputable VPNs do not
  have your billing and identity info (and payment can use cryptocurrencies) and
  don't keep logs. Many also have policies about refusal to cooporate with
  authorities in different juristictions. Also the VPN doesn't know your real IP.

  ## HTTPS, VPN, and encrypted DNS

  DNS queries hidded from both ISP and VPN. Traffic is fully encrypted and routed
  through VPN.

  ## Fingerprinting

  Note that none of the above stops fingerprinting. Even with full encryption
  there are methods of determining online behaviour through encrypted packet
  analysis and usage patterns.

  A way round this is to use SOCKS proxies which add hops or to use TOR. TOR
  effectively solves the "have to trust VPN provider" problem.

  With TOR:

  - Traffic routed through 3+ nodes
  - Each node only knows previous and next hop
  - No single node knows both source and destination. Even Tor nodes can't see the
    full path

  It also uses:

  - Fixed packet sizes
  - Timing obfuscation
  - Traffic padding

  Which makes pattern analysis and fingerprinting much harder than just a VPN.

  Furthermore there is also the following protection from VPN weaknesses:

  - No single provider to trust/compromise
  - Decentralized network
  - Free to use and no account needed
  - No permanent exit node like with VPN

raw_content:
  ---
  tags: [internet, encryption, privacy, TOR]
  created: Friday, December 13, 2024
  ---

  # What can the ISP see?

  ## Plain HTTP

  The ISP can see all content exchanged: DNS lookups, IP address of the server you
  connect to, requests and body content.

  ## Just HTTPS

  With HTTPS alone, the content of the messages is encrypted but the ISP can see:

  - DNS queries
  - IP addresses you connect to
  - Traffic patterns and metadata (when, how often, amount of data exchanged etc)

  ## HTTPS and encrypted DNS server

  With HTTPS and an encrypted DNS server (e.g. Quad9) the DNS queries are hidden
  but the IP addresses are not. So they could still derive your DNS lookups from
  the IPs you end up connecting to.

  ## HTTPS and VPN

  The ISP only sees the encrypted traffic to the VPN server. Your real IP and
  destination IP is hidden.

  However the VPN provider can potentially see DNS queries, depending on their
  policy. Although a good VPN provider will encrypt DNS lookups like an encrypted
  DNS server.

  The VPN can also still see what IPs you are connecting to. You are basically
  swiching trust from the ISP to the VPN provider. However reputable VPNs do not
  have your billing and identity info (and payment can use cryptocurrencies) and
  don't keep logs. Many also have policies about refusal to cooporate with
  authorities in different juristictions. Also the VPN doesn't know your real IP.

  ## HTTPS, VPN, and encrypted DNS

  DNS queries hidded from both ISP and VPN. Traffic is fully encrypted and routed
  through VPN.

  ## Fingerprinting

  Note that none of the above stops fingerprinting. Even with full encryption
  there are methods of determining online behaviour through encrypted packet
  analysis and usage patterns.

  A way round this is to use SOCKS proxies which add hops or to use TOR. TOR
  effectively solves the "have to trust VPN provider" problem.

  With TOR:

  - Traffic routed through 3+ nodes
  - Each node only knows previous and next hop
  - No single node knows both source and destination. Even Tor nodes can't see the
    full path

  It also uses:

  - Fixed packet sizes
  - Timing obfuscation
  - Traffic padding

  Which makes pattern analysis and fingerprinting much harder than just a VPN.

  Furthermore there is also the following protection from VPN weaknesses:

  - No single provider to trust/compromise
  - Decentralized network
  - Free to use and no account needed
  - No permanent exit node like with VPN


path: Network_packet_analysis_tools.md
sortable_path: Network_packet_analysis_tools.md
title: Network packet analysis tools
checksum: 6bffbdc731d985354637c3e58cefa82c0fce3db0c5514e06c091274a960afb4c
created: 2024-12-13 14:39:26.730227868+00:00
modified: 2024-12-13 14:41:45.257768788+00:00
metadata: {"created":"Friday, December 13, 2024","tags":["networks","procedural"]}
lead:
  - `tcpdump`: View raw packet data (`tcpdump -i wlan0 -XX` for full packet
    contents)
  - tshark: Wireshark's CLI for detailed packet analysis (`tshark -i wlan0 -V`)
  - `nethogs`: Monitor per-application network usage
  - `iftop`: Show bandwidth usage per connection

body:
  - `tcpdump`: View raw packet data (`tcpdump -i wlan0 -XX` for full packet
    contents)
  - tshark: Wireshark's CLI for detailed packet analysis (`tshark -i wlan0 -V`)
  - `nethogs`: Monitor per-application network usage
  - `iftop`: Show bandwidth usage per connection

raw_content:
  ---
  tags: [networks, procedural]
  created: Friday, December 13, 2024
  ---

  # Network packet analysis tools

  - `tcpdump`: View raw packet data (`tcpdump -i wlan0 -XX` for full packet
    contents)
  - tshark: Wireshark's CLI for detailed packet analysis (`tshark -i wlan0 -V`)
  - `nethogs`: Monitor per-application network usage
  - `iftop`: Show bandwidth usage per connection


path: User_agent.md
sortable_path: User_agent.md
title: User agent
checksum: 8ebaa79e8318ce51042596b2b34faeec781367002c93c8f5a8007a60e6c8a553
created: 2024-12-20 11:01:51.175194304+00:00
modified: 2024-12-20 11:05:59.817461091+00:00
metadata: {"created":"Friday, December 20, 2024","tags":["world-wide-web"]}
lead:
  _User agent_ is the technical term for a web browser. So named because it acts
  on behalf of the user.

body:
  _User agent_ is the technical term for a web browser. So named because it acts
  on behalf of the user.

  When a browser makes a request to a web server it includes a header value called
  `User-Agent` that describes the browser.

raw_content:
  ---
  tags: [world-wide-web]
  created: Friday, December 20, 2024
  ---

  # User agent

  _User agent_ is the technical term for a web browser. So named because it acts
  on behalf of the user.

  When a browser makes a request to a web server it includes a header value called
  `User-Agent` that describes the browser.


path: Dynamic_and_static_websites.md
sortable_path: Dynamic_and_static_websites.md
title: Dynamic and static websites
checksum: d823c51bb34e1fb4ebaf63240ab4f4196c1587b83e90ef6b71a80ce28ea9cdf1
created: 2024-12-20 11:06:21.197224512+00:00
modified: 2024-12-20 11:32:47.747935335+00:00
metadata: {"created":"Friday, December 20, 2024","tags":["world-wide-web"]}
lead:
  When we talk about dynamic and static websites we are talking about the role of
  the server, not anything to do with how the website behaves for the user.

body:
  When we talk about dynamic and static websites we are talking about the role of
  the server, not anything to do with how the website behaves for the user.

  A static site's content comes unchanged from the files on the server whereas a
  dynamic site's content is generated on the server.

  With a static website, the content of the site has been build before a request
  for it is made. It's HTML, CSS and JS are stored on the server and are simply
  returned to the client in this form when they are requested.

  When content is requested on a dynamic website the HTML is generated on-the-fly
  on the server-side and returned to the client. Typically a request will be made
  for an item of content, the data will be fetched on the backend from a DB and
  then formatted as HTML and sent back to the client.

  Static websites can be more performant because of the lack of BE processing
  however it means that any runtime processing or special rendering must be
  handled by the frontend JavaScript, without relying on server languages.

  Take the sourcing of remote data. With a dynamic site this can be handled in a
  single request because the backend can fetch the data and return to the client
  with the rendering applied. On the frontend, JS would have to make a request to
  an endpoint that calls a backend service that returns the data. Having received
  the raw data it would then need to render it.

  Nowadays there is generally a mixed approach. This distinction was more
  important in the early days of the web.

raw_content:
  ---
  tags: [world-wide-web]
  created: Friday, December 20, 2024
  ---

  # Dynamic and static websites

  When we talk about dynamic and static websites we are talking about the role of
  the server, not anything to do with how the website behaves for the user.

  A static site's content comes unchanged from the files on the server whereas a
  dynamic site's content is generated on the server.

  With a static website, the content of the site has been build before a request
  for it is made. It's HTML, CSS and JS are stored on the server and are simply
  returned to the client in this form when they are requested.

  When content is requested on a dynamic website the HTML is generated on-the-fly
  on the server-side and returned to the client. Typically a request will be made
  for an item of content, the data will be fetched on the backend from a DB and
  then formatted as HTML and sent back to the client.

  Static websites can be more performant because of the lack of BE processing
  however it means that any runtime processing or special rendering must be
  handled by the frontend JavaScript, without relying on server languages.

  Take the sourcing of remote data. With a dynamic site this can be handled in a
  single request because the backend can fetch the data and return to the client
  with the rendering applied. On the frontend, JS would have to make a request to
  an endpoint that calls a backend service that returns the data. Having received
  the raw data it would then need to render it.

  Nowadays there is generally a mixed approach. This distinction was more
  important in the early days of the web.


path: bbdcb54f_public_key_cryptography.md
sortable_path: bbdcb54f_public_key_cryptography.md
title: bbdcb54f_public_key_cryptography
checksum: c03f7d29fb3b86739ddab99d4d1e7c9f10bab31461cc9b6c3fe2f90f27c281fb
created: 2024-12-20 11:49:13.122588284+00:00
modified: 2024-12-20 13:12:22.104945119+00:00
metadata: {"created":"Friday, December 20, 2024","tags":["encryption","cryptography"]}
lead:
  _A_ wants to send a message to _B_. A wants to ensure that only _B_ can read the
  message and that it is not intercepted or altered during transmission to _B_.

body:
  _A_ wants to send a message to _B_. A wants to ensure that only _B_ can read the
  message and that it is not intercepted or altered during transmission to _B_.

  Think of _B_ as being in possession of a letterbox. The letterbox contains
  messages that only he can read. Anyone can put letters in it for _B_ to read but
  _B_ alone can read them.

  This is achieved by encyrpting the messages with two keys: a public key and a
  private key. The public key can be shared with others and anyone in possession
  of the public key can encrypt a message for _B_. Once encrypted, only _B_ can
  decrypt it using his private key. Once receiving the message, B uses his private
  secret key - that he doesn't share with anyone else - to decrypt. This is the
  equivalent to opening up the letterbox and taking out the letters.

  Another useful analogy is to think of invisible ink. Anyone can write a letter
  using the invisible ink but only the recipient has the liquid that can render it
  visible again. Anyone intercepting the message (without the liquid) will see
  nothing, equivalent to the encrypted data.

  This is asymmetric encryption because the two communicating parties do not have
  equal access to the messages exchanged. _A_ can only send messages - he can't
  decrypt them, only _B_ can. So _A_ is unequal relative to _B_. With symmetric
  encryption _A_ and _B_ would both share a single private key which they would
  each use to encrypt and decrypt their messages.

raw_content:
  ---
  tags: [encryption, cryptography]
  created: Friday, December 20, 2024
  ---

  # bbdcb54f_public_key_cryptography

  _A_ wants to send a message to _B_. A wants to ensure that only _B_ can read the
  message and that it is not intercepted or altered during transmission to _B_.

  Think of _B_ as being in possession of a letterbox. The letterbox contains
  messages that only he can read. Anyone can put letters in it for _B_ to read but
  _B_ alone can read them.

  This is achieved by encyrpting the messages with two keys: a public key and a
  private key. The public key can be shared with others and anyone in possession
  of the public key can encrypt a message for _B_. Once encrypted, only _B_ can
  decrypt it using his private key. Once receiving the message, B uses his private
  secret key - that he doesn't share with anyone else - to decrypt. This is the
  equivalent to opening up the letterbox and taking out the letters.

  Another useful analogy is to think of invisible ink. Anyone can write a letter
  using the invisible ink but only the recipient has the liquid that can render it
  visible again. Anyone intercepting the message (without the liquid) will see
  nothing, equivalent to the encrypted data.

  This is asymmetric encryption because the two communicating parties do not have
  equal access to the messages exchanged. _A_ can only send messages - he can't
  decrypt them, only _B_ can. So _A_ is unequal relative to _B_. With symmetric
  encryption _A_ and _B_ would both share a single private key which they would
  each use to encrypt and decrypt their messages.


path: a4601796_trapdoor_functions.md
sortable_path: a4601796_trapdoor_functions.md
title: a4601796_trapdoor_functions
checksum: 663700b03beee5d3d47e4d43afabc07b52f25db9a0844c1b033528bed50eced8
created: 2024-12-20 12:03:04.183937845+00:00
modified: 2024-12-20 13:12:24.194980394+00:00
metadata: {"created":"Friday, December 20, 2024","tags":["cryptography","encryption"]}
lead:
  How does [public key cryptography](./bbdcb54f_public_key_cryptography.md)
  achieve the feat of making the encyrpted data only decipherable in one
  direction. In other words how come the same data can be encrypted with one key
  but only decryptable by another?

body:
  How does [public key cryptography](./bbdcb54f_public_key_cryptography.md)
  achieve the feat of making the encyrpted data only decipherable in one
  direction. In other words how come the same data can be encrypted with one key
  but only decryptable by another?

  It is acheived by the use of **trapdoor functions**. These are functions that
  are easy to compute in one direction but extremely difficult to reverse. But
  they also contain trapdoors which, if known, make the functions trivially easy
  to compute in both directions.

  The public key holder can compute the encryption but only the private key holder
  has the trapdoor that makes reversing the encryption trivial.

  As an example we can look at a common method for generating trapdoor functions
  using prime numbers.

  First we need to convert the message into numerical form. One way would be to
  convert the characters to their ASCII numbers. These numbers then become input
  into the mathematical encryption function.

  Next we would pick two very large prime numbers. Using RSA-like encryption they
  would be need to be 2048+ bits in length. For the example we will use 17 and 23.

  For simplicity let's say that our message is one character equivalent to `5` in
  ASCII. We multiply our two primes to get 391 (17 x 23 = 391) and then find the
  remainder of: our message cubed and divided by the prime sum. This is `125`
  (`5^3 / 391`) which is now our encrypted message which we send.

  Unless you know the two primes which were used, it is extremely difficult and
  time consuming to reverse the calculation and find the factors that would get
  you back to the starting point (remember the numbers will be much larger in
  reality). The owner of the private key knows these primes however, so can do
  this.

raw_content:
  ---
  tags: [cryptography, encryption]
  created: Friday, December 20, 2024
  ---

  # a4601796_trapdoor_functions

  How does [public key cryptography](./bbdcb54f_public_key_cryptography.md)
  achieve the feat of making the encyrpted data only decipherable in one
  direction. In other words how come the same data can be encrypted with one key
  but only decryptable by another?

  It is acheived by the use of **trapdoor functions**. These are functions that
  are easy to compute in one direction but extremely difficult to reverse. But
  they also contain trapdoors which, if known, make the functions trivially easy
  to compute in both directions.

  The public key holder can compute the encryption but only the private key holder
  has the trapdoor that makes reversing the encryption trivial.

  As an example we can look at a common method for generating trapdoor functions
  using prime numbers.

  First we need to convert the message into numerical form. One way would be to
  convert the characters to their ASCII numbers. These numbers then become input
  into the mathematical encryption function.

  Next we would pick two very large prime numbers. Using RSA-like encryption they
  would be need to be 2048+ bits in length. For the example we will use 17 and 23.

  For simplicity let's say that our message is one character equivalent to `5` in
  ASCII. We multiply our two primes to get 391 (17 x 23 = 391) and then find the
  remainder of: our message cubed and divided by the prime sum. This is `125`
  (`5^3 / 391`) which is now our encrypted message which we send.

  Unless you know the two primes which were used, it is extremely difficult and
  time consuming to reverse the calculation and find the factors that would get
  you back to the starting point (remember the numbers will be much larger in
  reality). The owner of the private key knows these primes however, so can do
  this.


path: Binary_encoding_of_sound.md
sortable_path: Binary_encoding_of_sound.md
title: Binary encoding of sound
lead: Sound is a change in air pressure.
checksum: 49f4a2ec25f9431877890e0f6edfb7b9725f9b51382071c985b518d05793e144
created: 2024-12-27 12:29:02.492923417+00:00
modified: 2025-01-02 17:22:27.562253496+00:00
metadata: {"created":"Friday, December 27, 2024","tags":["sound","binary","analogue"]}
body:
  Sound is a change in air pressure.

  To record sound, we convert the change in air pressure into an electrical signal
  by means of a microphone. Effectively, the same natural waveform is converted
  from one medium (the vibration of air molecules) into another medium (electrical
  charge in a field) whilst retaining the same morphology. See
  [Recording and playback of sound](Recording_and_playback_of_sound.md).

  The resulting electrical signal is analogue: it has a continuous and variable
  frequency and amplitude and thus can have any value at any given moment.

  To encode this information digitally we need to make the continuous analogue
  single discrete, so that it can represented with a finite set of symbols (bits).

  This process is known as **quantization** and consists in sampling the analogue
  waveform. This means taking a measurement of it at different points in time -
  each second.

  CDs sample the audio source at a rate of 44.1 kHz: 44, 100 measurements of the
  signal per second.

  The measurements are then stored in a digital format: bits. The amount of bits
  used to record the measurement is the **bit-depth**. Each measurement is rounded
  to the nearest available digital value. CDs have a depth of 16 bits. Thus each
  measurement can be one of $16^2 = 65,536$ possible values.

  With sampling at a given bit-depth established, the **bit-rate** can be derived.

  This is the sampling rate (number of measurements per second) divided by the
  number of bits per sample (bit-depth), multiplied by the number of channels.

  Thus for stereo CDs this is:

  $$
  (44100 / 16 ) \cdot 2 = 1411200
  $$

  Or 1.4 Mb/s

  > Even with a high bit-rate (as with CDs) the process still necessarily involves
  > a loss of information when converting sound from analogue to digital. However,
  > given a high enough value for the sampling rate and bit-depth, the differences
  > are imperceptible to the human ear.

raw_content:
  ---
  tags: [sound, binary, analogue]
  created: Friday, December 27, 2024
  ---

  # Binary encoding of sound

  Sound is a change in air pressure.

  To record sound, we convert the change in air pressure into an electrical signal
  by means of a microphone. Effectively, the same natural waveform is converted
  from one medium (the vibration of air molecules) into another medium (electrical
  charge in a field) whilst retaining the same morphology. See
  [Recording and playback of sound](Recording_and_playback_of_sound.md).

  The resulting electrical signal is analogue: it has a continuous and variable
  frequency and amplitude and thus can have any value at any given moment.

  To encode this information digitally we need to make the continuous analogue
  single discrete, so that it can represented with a finite set of symbols (bits).

  This process is known as **quantization** and consists in sampling the analogue
  waveform. This means taking a measurement of it at different points in time -
  each second.

  CDs sample the audio source at a rate of 44.1 kHz: 44, 100 measurements of the
  signal per second.

  The measurements are then stored in a digital format: bits. The amount of bits
  used to record the measurement is the **bit-depth**. Each measurement is rounded
  to the nearest available digital value. CDs have a depth of 16 bits. Thus each
  measurement can be one of $16^2 = 65,536$ possible values.

  With sampling at a given bit-depth established, the **bit-rate** can be derived.

  This is the sampling rate (number of measurements per second) divided by the
  number of bits per sample (bit-depth), multiplied by the number of channels.

  Thus for stereo CDs this is:

  $$
  (44100 / 16 ) \cdot 2 = 1411200
  $$

  Or 1.4 Mb/s

  > Even with a high bit-rate (as with CDs) the process still necessarily involves
  > a loss of information when converting sound from analogue to digital. However,
  > given a high enough value for the sampling rate and bit-depth, the differences
  > are imperceptible to the human ear.


path: Audio_file_formats.md
sortable_path: Audio_file_formats.md
title: Audio file formats
lead: ## CD quality
checksum: 618daa1d68a637b54f26e3e16041039985606daa493d576509d141c4b5fd7c72
created: 2024-12-27 12:29:18.056498357+00:00
modified: 2025-01-02 17:31:38.478953252+00:00
metadata: {"created":"Friday, December 27, 2024","tags":["sound","binary"]}
body:
  ## CD quality

  We can use CD's as the digital gold standard as the best digital quality
  available (to consumers).

  CDs store audio in uncompressed PCM (Pulse Code Modulation) format.

  They have a sampling rate of 44.1kHz, which is done in two channels to enable
  stereo.

  ## What lossy formats entail

  A conversion to MP3 from, for example, a CD source is always a one-way process
  and is not reversible. Once information is discarded in the compression process,
  it cannot be retrieved.

  This is obviously in contrast to lossless methods like FLAC where the original
  CD audio can always be reconstructed.

  It follows from the above that if you repeatedly encode a CD source to MP3, it
  will deteriorate in quality since more data is being removed each time.

  ## Major audio formats

  ### WAV (Waveform Audio File Format)

  - CD-quality encoding with no compression
  - Bit-for-bit identical to the CD source
  - Historically developed for Windows machines but can play on all operating
    systems

  ### FLAC (Free Lossless Audio Codec)

  - Basically the same as WAV but in a (losslessly) compressed format
  - The difference between a novel in a text file (WAV) and as a zipped file

  ### MP3 (MPEG-1 Audio Layer MP3)

  - Lossy format.
  - When a WAV file (or other lossless format) is converted to MP3 a Fast Fourier
    Transform analysis is performed to determine the frequency of certain sounds
  - This is used by the encoder to decide which parts of the sound are
    imperceptible and thus which can be discarded to reduce the file size. This is
    done through the application of psycho-acoustic models.
  - The remaining data is then compressed
  - Examples of the data reduction applied:

    - Removing frequencies that humans cannot hear
    - Removing quieter sounds that are masked by louder sounds
    - Combining similar frequencies
    - Reducing stereo information where it is less noticeable

  ### OGG: Ogg Vorbis

  - An open-source alternative to MP3
  - Typically achieves better quality than MP3 at the same bit rate, especially at
    very high/ low frequencies
  - Also better stereo handling at low frequencies
  - Uses a more modern psycho-acoustic model

  ## Variable and constant bit rates

  For lossy formats like MP3, the amount of data that is being encoded from the
  uncompressed source is expressed via the unit of "bit rate": **how many
  thousands of bits are being used to represent each second of audio**.

  There are two methods of encoding that impact on the bit rate.

  With _variable bit rate_ encoding, the encoder dynamically adjusts the bit rate
  depending on what is happening in the music. During complex passages (e.g. a
  full orchestra) it uses a higher bit rate to capture the detail. During simpler
  passages (like a single instrument) it uses lower bit rates since less data is
  needed and during silence it can drop to very low bit rates.

  _Constant bit rate encoding_ uses the same bit rate throughout, it is
  consequently less efficient.

  When talking about the quality of MP3s there are generally two bit rates cited:

  - ~128kbps: acceptable but significantly reduced
  - 320kbps: the highest quality you can get whilst still using a lossy method
    like MP3

  With VBR, these are sometimes expressed as an average.

  Subjectively, A 128kbps MP3 might sound "underwater" or "swishy", while a
  320kbps version would preserve much more detail.

  Still, the bit-rate of a CD is 1411kbps! A 128kb/s MP3 is therefore only
  capturing about 9% of CD quality and a 320kbps MP3 is capturing about 23% of CD
  quality.

  ## Streaming services

  Spotify uses Ogg Vorbis throughout but uses different bit rates for its
  different tiers. The free tier has a range from 24-160kb/s at VBR with the
  option of 320kb/s on the premium tier.

  Other services offer FLAC or FLAC-equivalent quality at their most expensive
  tiers (Apple Music, Amazon Music, Tidal).

  Og Vorbis is particularly well-suited to streaming. It can seamlessly switch bit
  rates during the stream which is beneficial with changeable network conditions.
  Plus data is organised into independent packets so if a packet is lost there is
  no perceptible difference.

raw_content:
  ---
  tags: [sound, binary]
  created: Friday, December 27, 2024
  ---

  # Audio file formats

  ## CD quality

  We can use CD's as the digital gold standard as the best digital quality
  available (to consumers).

  CDs store audio in uncompressed PCM (Pulse Code Modulation) format.

  They have a sampling rate of 44.1kHz, which is done in two channels to enable
  stereo.

  ## What lossy formats entail

  A conversion to MP3 from, for example, a CD source is always a one-way process
  and is not reversible. Once information is discarded in the compression process,
  it cannot be retrieved.

  This is obviously in contrast to lossless methods like FLAC where the original
  CD audio can always be reconstructed.

  It follows from the above that if you repeatedly encode a CD source to MP3, it
  will deteriorate in quality since more data is being removed each time.

  ## Major audio formats

  ### WAV (Waveform Audio File Format)

  - CD-quality encoding with no compression
  - Bit-for-bit identical to the CD source
  - Historically developed for Windows machines but can play on all operating
    systems

  ### FLAC (Free Lossless Audio Codec)

  - Basically the same as WAV but in a (losslessly) compressed format
  - The difference between a novel in a text file (WAV) and as a zipped file

  ### MP3 (MPEG-1 Audio Layer MP3)

  - Lossy format.
  - When a WAV file (or other lossless format) is converted to MP3 a Fast Fourier
    Transform analysis is performed to determine the frequency of certain sounds
  - This is used by the encoder to decide which parts of the sound are
    imperceptible and thus which can be discarded to reduce the file size. This is
    done through the application of psycho-acoustic models.
  - The remaining data is then compressed
  - Examples of the data reduction applied:

    - Removing frequencies that humans cannot hear
    - Removing quieter sounds that are masked by louder sounds
    - Combining similar frequencies
    - Reducing stereo information where it is less noticeable

  ### OGG: Ogg Vorbis

  - An open-source alternative to MP3
  - Typically achieves better quality than MP3 at the same bit rate, especially at
    very high/ low frequencies
  - Also better stereo handling at low frequencies
  - Uses a more modern psycho-acoustic model

  ## Variable and constant bit rates

  For lossy formats like MP3, the amount of data that is being encoded from the
  uncompressed source is expressed via the unit of "bit rate": **how many
  thousands of bits are being used to represent each second of audio**.

  There are two methods of encoding that impact on the bit rate.

  With _variable bit rate_ encoding, the encoder dynamically adjusts the bit rate
  depending on what is happening in the music. During complex passages (e.g. a
  full orchestra) it uses a higher bit rate to capture the detail. During simpler
  passages (like a single instrument) it uses lower bit rates since less data is
  needed and during silence it can drop to very low bit rates.

  _Constant bit rate encoding_ uses the same bit rate throughout, it is
  consequently less efficient.

  When talking about the quality of MP3s there are generally two bit rates cited:

  - ~128kbps: acceptable but significantly reduced
  - 320kbps: the highest quality you can get whilst still using a lossy method
    like MP3

  With VBR, these are sometimes expressed as an average.

  Subjectively, A 128kbps MP3 might sound "underwater" or "swishy", while a
  320kbps version would preserve much more detail.

  Still, the bit-rate of a CD is 1411kbps! A 128kb/s MP3 is therefore only
  capturing about 9% of CD quality and a 320kbps MP3 is capturing about 23% of CD
  quality.

  ## Streaming services

  Spotify uses Ogg Vorbis throughout but uses different bit rates for its
  different tiers. The free tier has a range from 24-160kb/s at VBR with the
  option of 320kb/s on the premium tier.

  Other services offer FLAC or FLAC-equivalent quality at their most expensive
  tiers (Apple Music, Amazon Music, Tidal).

  Og Vorbis is particularly well-suited to streaming. It can seamlessly switch bit
  rates during the stream which is beneficial with changeable network conditions.
  Plus data is organised into independent packets so if a packet is lost there is
  no perceptible difference.


path: Recording_and_playback_of_sound.md
sortable_path: Recording_and_playback_of_sound.md
title: Recording and playback of sound
lead: ## Analogue
checksum: ba117d13d562a1cfffa839816844effd32d437afd558d0cb121f857c170ac5b1
created: 2025-01-02 16:47:21.217929078+00:00
modified: 2025-01-02 17:22:03.138219579+00:00
metadata: {"created":"Thursday, January 02, 2025","tags":["sound","analogue","physics"]}
body:
  ## Analogue

  ### Recording

  The microphone converts sound waves into a continuous electrical signal.

  The signal drives the recording equipment.

  In the case of a vinyl recording: the signal drives a cutting head that carves a
  groove into the master disk.

  In the case of a tape recording: the signal drives electro-magnets that align
  magnetic particles on the tape.

  In both cases, **the recording medium physically mirrors the shape of the sound
  wave**.

  ### Playback

  In the case of vinyl, the needle follows the groove, moving up and down to
  recreate the electrical signal.

  In the case of tape, the magnetic patterns induce electrical current in the
  playback head.

  In each case, the signal is transferred directly to amplifiers and speakers.

  ## Digital

  ### Recording

  Mostly covered in [Binary encoding of sound](Binary_encoding_of_sound.md).

  An important point to note is that the binary encoding that results from the
  sampling is lasered into the CD as microscopic impressions and depressions (pits
  and lands)

  ### Playback

  A laser in the reader reads the pits and lands and converts them back to binary
  numbers. A DAC then converts the numbers back into a continuous electrical
  signal which is then channelled to the amplifiers and speakers.

  ## From recording to production of storage medium

  With analogue production recordings would be made onto tape. Multiple takes are
  recorded, mixed and edited. This results in a master tape which is the final
  version of the recorded sound.

  This then goes to a mastering engineer for mastering which creates the master
  mix. This consists in optimising the sound for the given format (vinyl or tape).
  Also includes adjusting frequencies, levels and adding spacing between tracks.

  Then the master disk enters production. A recording is made onto lacquer disc
  which is very delicate. Often known as the "acetate". This is coated in metal to
  create the "metal master", after various processes this goes to the pressing
  plant who press vinyl copies from it.

  Each stage can introduce subtle variations, especially with re-pressings.
  Re-pressings require new stampers from the master which may have degraded in the
  interim. Plus there is a limit to the amount of pressings possible with a given
  stamper. The earlier pressings are therefore less degraded making them more
  valuable.

  ## Degradation

  With tape and vinyl each playback wears the medium, degrading the quality of the
  captured signal. With CDs, there is no degradation and every copy is a perfect
  copy of the original signal. However this capture, necessarily contains less
  information than the analogue version because of sampling.

raw_content:
  ---
  tags: [sound, analogue, physics]
  created: Thursday, January 02, 2025
  ---

  # Recording and playback of sound

  ## Analogue

  ### Recording

  The microphone converts sound waves into a continuous electrical signal.

  The signal drives the recording equipment.

  In the case of a vinyl recording: the signal drives a cutting head that carves a
  groove into the master disk.

  In the case of a tape recording: the signal drives electro-magnets that align
  magnetic particles on the tape.

  In both cases, **the recording medium physically mirrors the shape of the sound
  wave**.

  ### Playback

  In the case of vinyl, the needle follows the groove, moving up and down to
  recreate the electrical signal.

  In the case of tape, the magnetic patterns induce electrical current in the
  playback head.

  In each case, the signal is transferred directly to amplifiers and speakers.

  ## Digital

  ### Recording

  Mostly covered in [Binary encoding of sound](Binary_encoding_of_sound.md).

  An important point to note is that the binary encoding that results from the
  sampling is lasered into the CD as microscopic impressions and depressions (pits
  and lands)

  ### Playback

  A laser in the reader reads the pits and lands and converts them back to binary
  numbers. A DAC then converts the numbers back into a continuous electrical
  signal which is then channelled to the amplifiers and speakers.

  ## From recording to production of storage medium

  With analogue production recordings would be made onto tape. Multiple takes are
  recorded, mixed and edited. This results in a master tape which is the final
  version of the recorded sound.

  This then goes to a mastering engineer for mastering which creates the master
  mix. This consists in optimising the sound for the given format (vinyl or tape).
  Also includes adjusting frequencies, levels and adding spacing between tracks.

  Then the master disk enters production. A recording is made onto lacquer disc
  which is very delicate. Often known as the "acetate". This is coated in metal to
  create the "metal master", after various processes this goes to the pressing
  plant who press vinyl copies from it.

  Each stage can introduce subtle variations, especially with re-pressings.
  Re-pressings require new stampers from the master which may have degraded in the
  interim. Plus there is a limit to the amount of pressings possible with a given
  stamper. The earlier pressings are therefore less degraded making them more
  valuable.

  ## Degradation

  With tape and vinyl each playback wears the medium, degrading the quality of the
  captured signal. With CDs, there is no degradation and every copy is a perfect
  copy of the original signal. However this capture, necessarily contains less
  information than the analogue version because of sampling.


path: 738d0481_sound_recording_as_wave_phenomena.md
sortable_path: 738d0481_sound_recording_as_wave_phenomena.md
title: 738d0481_sound_recording_as_wave_phenomena
checksum: a9dc1aead9226467ca2ae21b8f7233ae0d3b326c9e2b6048e2d122ff0141b496
created: 2025-01-02 17:16:02.337376164+00:00
modified: 2025-01-02 18:02:28.77666568+00:00
metadata: {"created":"Thursday, January 02, 2025","tags":["sound","analogue","physics"]}
lead:
  When the microphone captures alterations in sound pressure and converts it into
  an electric signal, we have a scenario where the same formal or mathematical
  relationships in the phenomena (amplitude, frequency, wavelength) are being
  expressed in two different modes of matter.

body:
  When the microphone captures alterations in sound pressure and converts it into
  an electric signal, we have a scenario where the same formal or mathematical
  relationships in the phenomena (amplitude, frequency, wavelength) are being
  expressed in two different modes of matter.

  This is quite profound especially as the resulting electrical waveform is
  _identical_ to the original sound wave. This is effectively what enables
  accurate playback. We can convert between the two mediums seamlessly providing
  we captured their initial expression accurately.

  It's like two different people doing the same dance:

  In air:

  - The dancers are air molecules
  - They move back and forth in waves of compression and rarefaction
  - Their "dance pattern" is the sound wave

  In wire:

  - The dancers are electrons
  - They move back and forth creating waves of voltage
  - They perform the exact same "dance pattern"

raw_content:
  ---
  tags: [sound, analogue, physics]
  created: Thursday, January 02, 2025
  ---

  # 738d0481_sound_recording_as_wave_phenomena

  When the microphone captures alterations in sound pressure and converts it into
  an electric signal, we have a scenario where the same formal or mathematical
  relationships in the phenomena (amplitude, frequency, wavelength) are being
  expressed in two different modes of matter.

  This is quite profound especially as the resulting electrical waveform is
  _identical_ to the original sound wave. This is effectively what enables
  accurate playback. We can convert between the two mediums seamlessly providing
  we captured their initial expression accurately.

  It's like two different people doing the same dance:

  In air:

  - The dancers are air molecules
  - They move back and forth in waves of compression and rarefaction
  - Their "dance pattern" is the sound wave

  In wire:

  - The dancers are electrons
  - They move back and forth creating waves of voltage
  - They perform the exact same "dance pattern"


path: Monitor_DNS_resolution_and_internet_connectivity_script.md
sortable_path: Monitor_DNS_resolution_and_internet_connectivity_script.md
title: Monitor DNS resolution and internet connectivity script
checksum: 2783031db8f9eb0513eac607269b61e28142fb41b6b64f915b67878f8097e49b
created: 2025-01-04 13:27:13.572149706+00:00
modified: 2025-01-13 20:54:38.228432527+00:00
metadata: {"created":"Monday, January 13, 2025","tags":["networks","procedural"]}
lead:
  ```bash
   while true; do
      date
      echo "DNS check:"
      host google.com
      echo "Ping check:"
      ping -c 1 google.com | grep "time="
      echo "---"
      sleep 5
  done
  ```

body:
  ```bash
   while true; do
      date
      echo "DNS check:"
      host google.com
      echo "Ping check:"
      ping -c 1 google.com | grep "time="
      echo "---"
      sleep 5
  done
  ```

  See [ping](./Ping.md) for more details on what this is doing.

  The `host` command contacts a DNS server and does a reverse lookup for the
  IP-address of the human-readable domain name.

raw_content:
  ---
  tags: [networks, procedural]
  created: Monday, January 13, 2025
  ---

  # Monitor DNS resolution and internet connectivity script

  ```bash
   while true; do
      date
      echo "DNS check:"
      host google.com
      echo "Ping check:"
      ping -c 1 google.com | grep "time="
      echo "---"
      sleep 5
  done
  ```

  See [ping](./Ping.md) for more details on what this is doing.

  The `host` command contacts a DNS server and does a reverse lookup for the
  IP-address of the human-readable domain name.


path: 747589ad_effects_of_privacy_violation.md
sortable_path: 747589ad_effects_of_privacy_violation.md
title: 747589ad_effects_of_privacy_violation
checksum: c2ddc920f3ad949a4524a43d94ece19d3de464e8709332e389b91bf1fe07f8f5
created: 2025-01-09 18:50:38.180558945+00:00
modified: 2025-01-09 19:03:41.565691729+00:00
metadata: {"created":"Thursday, January 09, 2025","tags":["ecopolsoc","privacy","surveillance-capitalism"]}
lead:
  _What surveillance really is, at its root, is a highly effective form of social
  control. The knowledge of always being watched changes our behavior and stifles
  dissent. The inability to associate secretly means there is no longer any
  possibility for free association. The inability to whisper means there is no
  longer any speech that is truly free of coercion, real or implied. Most
  profoundly, pervasive surveillance threatens to eliminate the most vital element
  of both democracy and social movements: the mental space for people to form
  dissenting and unpopular views._

body:
  _What surveillance really is, at its root, is a highly effective form of social
  control. The knowledge of always being watched changes our behavior and stifles
  dissent. The inability to associate secretly means there is no longer any
  possibility for free association. The inability to whisper means there is no
  longer any speech that is truly free of coercion, real or implied. Most
  profoundly, pervasive surveillance threatens to eliminate the most vital element
  of both democracy and social movements: the mental space for people to form
  dissenting and unpopular views._

  - https://riseup.net/en/about-us/newsletter/2013/08#riseup-and-the-recent-email-provider-closures

  _If you live in a surveillance state for long enough, you create a censor in
  your head. When video cameras are routine fixtures in urban landscapes; when
  corporate Internet giants store records of online navigation and communication;
  and when managers and bosses maintain capabilities to measure and monitor
  employees as never before, society at large pays the price. These different
  vectors of surveillance aggregate, exerting a pressure for us to blend in, to
  think twice before speaking out, to, in essence, follow a narrow set of
  prescribed norms. Social conformity encourages quiet resignation and discourages
  the experimental - and necessarily risky - acts of speaking, thinking, and doing
  required for healthy democratic dissent._

  Gabriella Coleman. _Hacker, Hoaxer, Whistleblower, Spy_ (2014): 380

raw_content:
  ---
  tags: [ecopolsoc, privacy, surveillance-capitalism]
  created: Thursday, January 09, 2025
  ---

  # 747589ad_effects_of_privacy_violation

  _What surveillance really is, at its root, is a highly effective form of social
  control. The knowledge of always being watched changes our behavior and stifles
  dissent. The inability to associate secretly means there is no longer any
  possibility for free association. The inability to whisper means there is no
  longer any speech that is truly free of coercion, real or implied. Most
  profoundly, pervasive surveillance threatens to eliminate the most vital element
  of both democracy and social movements: the mental space for people to form
  dissenting and unpopular views._

  - https://riseup.net/en/about-us/newsletter/2013/08#riseup-and-the-recent-email-provider-closures

  _If you live in a surveillance state for long enough, you create a censor in
  your head. When video cameras are routine fixtures in urban landscapes; when
  corporate Internet giants store records of online navigation and communication;
  and when managers and bosses maintain capabilities to measure and monitor
  employees as never before, society at large pays the price. These different
  vectors of surveillance aggregate, exerting a pressure for us to blend in, to
  think twice before speaking out, to, in essence, follow a narrow set of
  prescribed norms. Social conformity encourages quiet resignation and discourages
  the experimental - and necessarily risky - acts of speaking, thinking, and doing
  required for healthy democratic dissent._

  Gabriella Coleman. _Hacker, Hoaxer, Whistleblower, Spy_ (2014): 380


path: View_IP_addresses.md
sortable_path: View_IP_addresses.md
title: View IP addresses
lead:
  Use `ip` package to view the [IP addresses](IP_addresses.md) associated with
  your current host:

checksum: eb10adeb1c2a55330524862e35dd667be3d04ac8a31d607e3bc2d3974587fcd1
created: 2025-01-10 16:51:50.329623342+00:00
modified: 2025-01-10 17:09:27.835728168+00:00
metadata: {"created":"Friday, January 10, 2025","tags":["networks","procedural","Linux"]}
body:
  Use `ip` package to view the [IP addresses](IP_addresses.md) associated with
  your current host:

  ```sh
  ip address show
  ```

  I am curently using ethernet on the computer I am writing this. This is listed
  as follows:

  ```
  enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
  link/ether 90:2e:16:53:98:b9 brd ff:ff:ff:ff:ff:ffinet
  192.168.0.3/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s31f6
      valid_lft 83353sec preferred_lft 83353sec
  ```

  The most important line is the third. This indicates my IP address
  (`192.168.0.3/24`) including its subnet mask.

raw_content:
  ---
  tags: [networks, procedural, Linux]
  created: Friday, January 10, 2025
  ---

  # View IP addresses

  Use `ip` package to view the [IP addresses](IP_addresses.md) associated with
  your current host:

  ```sh
  ip address show
  ```

  I am curently using ethernet on the computer I am writing this. This is listed
  as follows:

  ```
  enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
  link/ether 90:2e:16:53:98:b9 brd ff:ff:ff:ff:ff:ffinet
  192.168.0.3/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s31f6
      valid_lft 83353sec preferred_lft 83353sec
  ```

  The most important line is the third. This indicates my IP address
  (`192.168.0.3/24`) including its subnet mask.


path: Ping.md
sortable_path: Ping.md
title: Ping
checksum: 93c2e66315606664cbc568d8ba2309d8a5c0826627747e27188931b6314703bd
created: 2025-01-13 20:27:31.401736298+00:00
modified: 2025-01-13 20:54:42.518506698+00:00
metadata: {"created":"Monday, January 13, 2025","tags":["networks","procedural"]}
lead:
  `ping` is perhaps the most basic network debugging tool. It sends
  [ICMP](./ICMP_Protocol.md) echo request packets to a recipient host.

body:
  `ping` is perhaps the most basic network debugging tool. It sends
  [ICMP](./ICMP_Protocol.md) echo request packets to a recipient host.

  If the recipient receives the packet and is configured to reply, it sends an
  ICMP echo response packet in return.

  For example:

  ```
  $ ping google.com
  PING google.com (142.250.200.14) 56(84) bytes of data.
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=1 ttl=116 time=19.1 ms
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=2 ttl=116 time=19.2 ms
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=3 ttl=116 time=19.1 ms
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=4 ttl=116 time=21.1 ms
  ```

  The first indicates the IP address of the host you are pinging (once per second,
  by default). The subsequent lines are the response packets, echoed back from
  this host.

  The `icmp_seq` is the number of the request in the sequence. If there was to be
  a gap in the sequence, this would be the clearest indication of a connection
  problem.The packets should not arrive out of order since there is only one
  packet being sent per second.

  `time` is the round-trip time - from the sending of the packet to its return to
  the sender.

  If the packet cannot reach the destination host, the final router to see the
  packet retunes a "host unreachable" packet to `ping`.

raw_content:
  ---
  tags: [networks, procedural]
  created: Monday, January 13, 2025
  ---

  # Ping

  `ping` is perhaps the most basic network debugging tool. It sends
  [ICMP](./ICMP_Protocol.md) echo request packets to a recipient host.

  If the recipient receives the packet and is configured to reply, it sends an
  ICMP echo response packet in return.

  For example:

  ```
  $ ping google.com
  PING google.com (142.250.200.14) 56(84) bytes of data.
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=1 ttl=116 time=19.1 ms
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=2 ttl=116 time=19.2 ms
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=3 ttl=116 time=19.1 ms
  64 bytes from lhr48s29-in-f14.1e100.net (142.250.200.14): icmp_seq=4 ttl=116 time=21.1 ms
  ```

  The first indicates the IP address of the host you are pinging (once per second,
  by default). The subsequent lines are the response packets, echoed back from
  this host.

  The `icmp_seq` is the number of the request in the sequence. If there was to be
  a gap in the sequence, this would be the clearest indication of a connection
  problem.The packets should not arrive out of order since there is only one
  packet being sent per second.

  `time` is the round-trip time - from the sending of the packet to its return to
  the sender.

  If the packet cannot reach the destination host, the final router to see the
  packet retunes a "host unreachable" packet to `ping`.


path: ICMP_Protocol.md
sortable_path: ICMP_Protocol.md
title: ICMP Protocol
checksum: 81995cf8b107982fa597a658a7ae4ae2532b03dd8636940b6b4f9dd4da5d5693
created: 2025-01-13 20:53:19.536774731+00:00
modified: 2025-01-13 20:40:58.180917574+00:00
metadata: {"created":"Monday, January 13, 2025","tags":["networks"]}
lead:
  The Internet Control Message Protocol operates alongside the
  [Internet Protocol](Internet_Layer_of_Internet_Protocol.md) at the
  [Transport Layer](Transport_Layer_of_Internet_Protocol.md).

body:
  The Internet Control Message Protocol operates alongside the
  [Internet Protocol](Internet_Layer_of_Internet_Protocol.md) at the
  [Transport Layer](Transport_Layer_of_Internet_Protocol.md).

  It doesn't carry any actual user data and thus there is no
  [Application Layer](Application_Layer_of_Internet_Protocol.md) processes above
  it. It's usage is primarily for diagnostics and debugging. When network problems
  occur, ICMP generates messages to report errors back to the source.

  Probably the most familiar tools related to ICMP is [Ping](Ping.md).

raw_content:
  ---
  tags: [networks]
  created: Monday, January 13, 2025
  ---

  # ICMP Protocol

  The Internet Control Message Protocol operates alongside the
  [Internet Protocol](Internet_Layer_of_Internet_Protocol.md) at the
  [Transport Layer](Transport_Layer_of_Internet_Protocol.md).

  It doesn't carry any actual user data and thus there is no
  [Application Layer](Application_Layer_of_Internet_Protocol.md) processes above
  it. It's usage is primarily for diagnostics and debugging. When network problems
  occur, ICMP generates messages to report errors back to the source.

  Probably the most familiar tools related to ICMP is [Ping](Ping.md).


path: c9d7492f_requerimiento.md
sortable_path: c9d7492f_requerimiento.md
title: c9d7492f_requerimiento
checksum: d6deba34cb598c5af3990c218985e07d74483368d97e451556392cb118e5e990
created: 2025-01-20 18:03:46.146452477+00:00
modified: 2025-01-21 16:29:03.411943638+00:00
metadata: {"created":"Monday, January 20, 2025","tags":["ecopolsoc","internet","surveillance-capitalism"]}
lead:
  Zuboff likens the expropriation of private information by surveillance
  capitalists to the behaviour of the Conquistadores when they first arrived in
  South America.

body:
  Zuboff likens the expropriation of private information by surveillance
  capitalists to the behaviour of the Conquistadores when they first arrived in
  South America.

  In order to legitimise their actions they were obliged to inform the native
  inhabitants of their intentions and tell them that they were now subordinate to
  the Spanish crown.

  This provided supposed justification for the violence and brutality that would
  follow if the natives did not comply. Sometimes the declaration would just be
  muttered moments before attack.

  "Conquest by declaration" is also the technique of Google, she claims. The
  equivalent of the _requerimiento_ being the opaque and incomprehensible terms of
  of service, _designed_ not to be read.

  _These twenty-first-century invaders do not ask permission; the forge ahead,
  papering the scorched earth with faux-legitimation practices. Instead of
  cynically conveyed monarchical edicts, they offer cynically conveyed
  terms-of-service agreements whose stipulations are just as obscured and
  incomprehensible. They build their fortifications, fiercely defending their
  claimed territories, while gathering strength for the next incursion.
  Eventually, they build their towns in intricate ecosystems of commerce, politics
  and culture that declare the legitimacy and inevitability of all that they have
  accomplished._

  _The Age of Surveillance Capitalism_ (2019): 179

raw_content:
  ---
  tags: [ecopolsoc, internet, surveillance-capitalism]
  created: Monday, January 20, 2025
  ---

  # c9d7492f_requerimiento

  Zuboff likens the expropriation of private information by surveillance
  capitalists to the behaviour of the Conquistadores when they first arrived in
  South America.

  In order to legitimise their actions they were obliged to inform the native
  inhabitants of their intentions and tell them that they were now subordinate to
  the Spanish crown.

  This provided supposed justification for the violence and brutality that would
  follow if the natives did not comply. Sometimes the declaration would just be
  muttered moments before attack.

  "Conquest by declaration" is also the technique of Google, she claims. The
  equivalent of the _requerimiento_ being the opaque and incomprehensible terms of
  of service, _designed_ not to be read.

  _These twenty-first-century invaders do not ask permission; the forge ahead,
  papering the scorched earth with faux-legitimation practices. Instead of
  cynically conveyed monarchical edicts, they offer cynically conveyed
  terms-of-service agreements whose stipulations are just as obscured and
  incomprehensible. They build their fortifications, fiercely defending their
  claimed territories, while gathering strength for the next incursion.
  Eventually, they build their towns in intricate ecosystems of commerce, politics
  and culture that declare the legitimacy and inevitability of all that they have
  accomplished._

  _The Age of Surveillance Capitalism_ (2019): 179


path: 4dec6fe0_shadow_text.md
sortable_path: 4dec6fe0_shadow_text.md
title: 4dec6fe0_shadow_text
checksum: 4285ac86bb54e3db9fde04613ea1b8ebaa3870262e8a7fd582492a1e59f86832
created: 2025-01-20 18:13:35.230592075+00:00
modified: 2025-01-21 16:29:26.828989586+00:00
metadata: {"created":"Monday, January 20, 2025","tags":["ecopolsoc","internet","surveillance-capitalism"]}
lead:
  Surveillance capitalism creates two "electronic texts". The first is the
  public-facing text which consists in the benefits conferred by the surveillance
  capitalists' services, expressed in their self-regarding mission statements. The
  "universe of information and connection [they] bring to our fingertips" (posts,
  blogs, likes, photos, spreadsheets, music, tweets etc).

body:
  Surveillance capitalism creates two "electronic texts". The first is the
  public-facing text which consists in the benefits conferred by the surveillance
  capitalists' services, expressed in their self-regarding mission statements. The
  "universe of information and connection [they] bring to our fingertips" (posts,
  blogs, likes, photos, spreadsheets, music, tweets etc).

  The first text is a sort of Trojan Horse, serving as the "supply operation" for
  the second, _shadow_ text. Everything we contribute to the first text becomes a
  target for surplus extraction via the shadow text. This is the ultimate purpose
  of the services and is hidden from view and only for the purview of the
  surveillance capitalists.

  _In this text, our experience is dragooned as raw material to be accumulated and
  analyzed as means to others' market ends. The shadow text is a burgeoning
  accumulation of behavioural surplus and its analyses, and it says more about us
  than we can know about ourselves. Worse still, it becomes increasingly
  difficult, and perhaps impossible, to refrain from contributing to the shadow
  text. It automatically feeds on our experience as we engage in the normal and
  necessary routines of social participation._

  _The Age of Surveillance Capitalism_ (2019): 185

raw_content:
  ---
  tags: [ecopolsoc, internet, surveillance-capitalism]
  created: Monday, January 20, 2025
  ---

  # 4dec6fe0_shadow_text

  Surveillance capitalism creates two "electronic texts". The first is the
  public-facing text which consists in the benefits conferred by the surveillance
  capitalists' services, expressed in their self-regarding mission statements. The
  "universe of information and connection [they] bring to our fingertips" (posts,
  blogs, likes, photos, spreadsheets, music, tweets etc).

  The first text is a sort of Trojan Horse, serving as the "supply operation" for
  the second, _shadow_ text. Everything we contribute to the first text becomes a
  target for surplus extraction via the shadow text. This is the ultimate purpose
  of the services and is hidden from view and only for the purview of the
  surveillance capitalists.

  _In this text, our experience is dragooned as raw material to be accumulated and
  analyzed as means to others' market ends. The shadow text is a burgeoning
  accumulation of behavioural surplus and its analyses, and it says more about us
  than we can know about ourselves. Worse still, it becomes increasingly
  difficult, and perhaps impossible, to refrain from contributing to the shadow
  text. It automatically feeds on our experience as we engage in the normal and
  necessary routines of social participation._

  _The Age of Surveillance Capitalism_ (2019): 185


path: LineageOS_backup.md
sortable_path: LineageOS_backup.md
title: LineageOS major update procedure
lead: ## Backup
checksum: 8c8e95de8036787cb60edf83fb490b1b163818e6da4266b26ba8e7300305dcea
created: 2025-01-24 17:22:55.866259038+00:00
modified: 2025-01-24 19:35:54.296081399+00:00
metadata: {"created":"Friday, January 24, 2025","tags":["procedural","linux","android"]}
body:
  ## Backup

  - Enable developer mode by going to Settings > About Phone and tapping "Build
    Number" seven times

  - Enable USB debugging in Developer Options

  - Test by running `adb devices` in PC terminal

  - Then run `adb backup -apk -shared -all -system -f lineage_backup.ab`

  ## Download latest version of TWRP

  Make sure you get the right one for Google Pixel 2 (taimen), e.g:

  ```
  twrp-3.7.0_9-0-taimen.img
  ```

  ## Download ROM image and associated files

  Go to
  [https://wiki.lineageos.org/devices/taimen/](https://wiki.lineageos.org/devices/taimen/),
  download zip, viz.

  ```
  lineage-22.1-20250123-nightly-taimen-signed.zip
  ```

  ## Boot into fastboot

  Press Power + Vol Down

  Check connection with:

  ```
  fastboot devices
  ```

  ## Boot into TWRP

  ```
  fastboot boot  twrp-3.7.0_9-0-taimen.img
  ```

  ## Copy OS rom to Phone

  ```
  adb push lineage-22*.zip /sdcard/
  ```

  ## Install OS in TWRP

  In TWRP select Install > Select ROM zip

  Select flash

  Then reboot

  ```

  ```

raw_content:
  ---
  tags: [procedural, linux, android]
  created: Friday, January 24, 2025
  ---

  # LineageOS major update procedure

  ## Backup

  - Enable developer mode by going to Settings > About Phone and tapping "Build
    Number" seven times

  - Enable USB debugging in Developer Options

  - Test by running `adb devices` in PC terminal

  - Then run `adb backup -apk -shared -all -system -f lineage_backup.ab`

  ## Download latest version of TWRP

  Make sure you get the right one for Google Pixel 2 (taimen), e.g:

  ```
  twrp-3.7.0_9-0-taimen.img
  ```

  ## Download ROM image and associated files

  Go to
  [https://wiki.lineageos.org/devices/taimen/](https://wiki.lineageos.org/devices/taimen/),
  download zip, viz.

  ```
  lineage-22.1-20250123-nightly-taimen-signed.zip
  ```

  ## Boot into fastboot

  Press Power + Vol Down

  Check connection with:

  ```
  fastboot devices
  ```

  ## Boot into TWRP

  ```
  fastboot boot  twrp-3.7.0_9-0-taimen.img
  ```

  ## Copy OS rom to Phone

  ```
  adb push lineage-22*.zip /sdcard/
  ```

  ## Install OS in TWRP

  In TWRP select Install > Select ROM zip

  Select flash

  Then reboot

  ```

  ```


path: Proxies.md
sortable_path: Proxies.md
title: Proxies
checksum: c9e57817c83a63911f8dbce2a5d9d6b49013996b0a74b9880930cae767f789a7
created: 2025-02-03 12:33:32.607174396+00:00
modified: 2025-02-03 12:45:57.62435577+00:00
metadata: {"created":"Monday, February 03, 2025","tags":["networks","proxies"]}
lead:
  A standard proxy stands as a blocking layer between a client and a server. A
  client makes a request to a server but before it reaches it, it is intercepted
  by a proxy that reviews the request and decides whether to pass on to the
  requested location.

body:
  A standard proxy stands as a blocking layer between a client and a server. A
  client makes a request to a server but before it reaches it, it is intercepted
  by a proxy that reviews the request and decides whether to pass on to the
  requested location.

  As such, from the server's point of view, the request comes from the proxy not
  the client.

  An example application would be organisations who want to monitor or filter
  their employees web activities.

  A **reverse proxy** has the opposite orientation. It acts as buffer between a
  server and a client, filtering the requests that are sent to a server.

  This can also be for reasons of security, but most typically a reverse-proxy is
  used to manage requests to different services that a server is running.

  If a client requests `service-a.some-server/slug` the request is sent to the
  proxy operating at the root level, it siphons the request to its intended
  sub-service (`service-a`) and the port this service is running on.

  So, from the point of view of Service A, the request doesn't come from the
  external client but from the reverse proxy.

  In addition to directing traffic, reverse proxies can also implement load
  balancing: running procedures that ensure traffic is met at times of high
  capacity, ensuring that the server's resources are not exhausted.

raw_content:
  ---
  tags: [networks, proxies]
  created: Monday, February 03, 2025
  ---

  # Proxies

  A standard proxy stands as a blocking layer between a client and a server. A
  client makes a request to a server but before it reaches it, it is intercepted
  by a proxy that reviews the request and decides whether to pass on to the
  requested location.

  As such, from the server's point of view, the request comes from the proxy not
  the client.

  An example application would be organisations who want to monitor or filter
  their employees web activities.

  A **reverse proxy** has the opposite orientation. It acts as buffer between a
  server and a client, filtering the requests that are sent to a server.

  This can also be for reasons of security, but most typically a reverse-proxy is
  used to manage requests to different services that a server is running.

  If a client requests `service-a.some-server/slug` the request is sent to the
  proxy operating at the root level, it siphons the request to its intended
  sub-service (`service-a`) and the port this service is running on.

  So, from the point of view of Service A, the request doesn't come from the
  external client but from the reverse proxy.

  In addition to directing traffic, reverse proxies can also implement load
  balancing: running procedures that ensure traffic is met at times of high
  capacity, ensuring that the server's resources are not exhausted.


path: e383b8b3_nginx_vs_traefik.md
sortable_path: e383b8b3_nginx_vs_traefik.md
title: e383b8b3_nginx_vs_traefik
checksum: 670bc2639951745e4940a6ad5aab4c8de9543aea604ae4d97270e799826db92f
created: 2025-02-03 12:45:42.187390835+00:00
modified: 2025-02-03 12:48:36.34026334+00:00
metadata: {"created":"Monday, February 03, 2025","tags":["networks","proxies"]}
lead:
  Both nginx and traefik are server technologies (along with Apache), nginx has a
  longer pedigree but traefik is calibrated for more modern microservice-based
  architectures (i.e Docker containers). nginx is better suited to traditional
  static web-based hosting.

body:
  Both nginx and traefik are server technologies (along with Apache), nginx has a
  longer pedigree but traefik is calibrated for more modern microservice-based
  architectures (i.e Docker containers). nginx is better suited to traditional
  static web-based hosting.

  traefik has support for [HTTPS](./HTTPS.md) natively whereas nginx requires a
  plugin.

raw_content:
  ---
  tags: [networks, proxies]
  created: Monday, February 03, 2025
  ---

  # e383b8b3_nginx_vs_traefik

  Both nginx and traefik are server technologies (along with Apache), nginx has a
  longer pedigree but traefik is calibrated for more modern microservice-based
  architectures (i.e Docker containers). nginx is better suited to traditional
  static web-based hosting.

  traefik has support for [HTTPS](./HTTPS.md) natively whereas nginx requires a
  plugin.


path: Certificate_authorities.md
sortable_path: Certificate_authorities.md
title: Certificates and certificate authorities
checksum: 047237ad9e8dbb7fced64d1134f59bc5cd8deda8e8d4795f6c99d8fd4d2b370c
created: 2025-02-09 12:18:13.284687081+00:00
modified: 2025-02-09 12:52:41.163136172+00:00
metadata: {"created":"Sunday, February 09, 2025","tags":["networks","server-management"]}
lead:
  > HTTPS is a secure tunnel for data transmission, but the certificate is what
  > establishes trust and enables the secure tunnel in the first place.

body:
  > HTTPS is a secure tunnel for data transmission, but the certificate is what
  > establishes trust and enables the secure tunnel in the first place.

  Before secure communication over HTTPS can commence between a client and a
  server, the client must confirm that the server is who it says it is. This is in
  order to prevent man-in-the-middle attacks where malicious actors attempt to
  impersonate legitimate websites.

  Certificates exist to authenticate domains, prior to the exchange of encrypted
  data. To do this, a server generates a certificate with a reputable Certificate
  Authority, thereby verifying its identity with the CA. It sends this certificate
  (which includes its [public key](./bbdcb54f_public_key_cryptography.md)) when
  initiating a connection with a client.

  In addition to the public key, the certificate provides:

  - the domain name
  - the CA that certified the domain
  - the period of validity
  - a digital signature from the CA

  The client uses this data to validate the identity of the server it has sent a
  request to. Browsers come pre-installed with a list of trusted CAs.

  Certificates are called TLS/SSL certificates but the main protocol is TLS rather
  than SSL.

  Indications that a server is not to be trusted include:

  - expired certificates
  - certificates issued for the wrong domain
  - self-signed certificates not issued by a trusted CA

  ## Certification process

  Standard domain-validated authentication proceeds as follows:

  1. Server generates public/private key pair
  2. Server creates a certificate signing request containing its public key and
     domain name
  3. CA validates the domain and signs the certificate with its private key
  4. Server discloses its public key and CA signature
  5. Client knows CAs public key and uses this to verify the signature
  6. Server's public key is then trusted

  ### How validation executes between CA and server

  To validate the domain (step 3 above), the CA gives the server a "challenge" to
  prove they control the domain. This can include:

  - Putting a specific token as a DNS TXT record (DNS validation)
  - Putting a file at a certain URL (HTTP validation)
  - Email validation: sending an email to standard admin address for the server.
    Server owner clicks the link.

raw_content:
  ---
  tags: [networks, server-management]
  created: Sunday, February 09, 2025
  ---

  # Certificates and certificate authorities

  > HTTPS is a secure tunnel for data transmission, but the certificate is what
  > establishes trust and enables the secure tunnel in the first place.

  Before secure communication over HTTPS can commence between a client and a
  server, the client must confirm that the server is who it says it is. This is in
  order to prevent man-in-the-middle attacks where malicious actors attempt to
  impersonate legitimate websites.

  Certificates exist to authenticate domains, prior to the exchange of encrypted
  data. To do this, a server generates a certificate with a reputable Certificate
  Authority, thereby verifying its identity with the CA. It sends this certificate
  (which includes its [public key](./bbdcb54f_public_key_cryptography.md)) when
  initiating a connection with a client.

  In addition to the public key, the certificate provides:

  - the domain name
  - the CA that certified the domain
  - the period of validity
  - a digital signature from the CA

  The client uses this data to validate the identity of the server it has sent a
  request to. Browsers come pre-installed with a list of trusted CAs.

  Certificates are called TLS/SSL certificates but the main protocol is TLS rather
  than SSL.

  Indications that a server is not to be trusted include:

  - expired certificates
  - certificates issued for the wrong domain
  - self-signed certificates not issued by a trusted CA

  ## Certification process

  Standard domain-validated authentication proceeds as follows:

  1. Server generates public/private key pair
  2. Server creates a certificate signing request containing its public key and
     domain name
  3. CA validates the domain and signs the certificate with its private key
  4. Server discloses its public key and CA signature
  5. Client knows CAs public key and uses this to verify the signature
  6. Server's public key is then trusted

  ### How validation executes between CA and server

  To validate the domain (step 3 above), the CA gives the server a "challenge" to
  prove they control the domain. This can include:

  - Putting a specific token as a DNS TXT record (DNS validation)
  - Putting a file at a certain URL (HTTP validation)
  - Email validation: sending an email to standard admin address for the server.
    Server owner clicks the link.


path: Firewalls.md
sortable_path: Firewalls.md
title: Firewalls
checksum: 29e6185801c4264321ebfb9f6f589e8b33ea637825cc093722dcf7a8a9347cb0
created: 2025-02-09 12:53:38.517010875+00:00
modified: 2025-02-09 13:26:51.368788554+00:00
metadata: {"created":"Sunday, February 09, 2025","tags":["networks","server-management"]}
lead:
  A firewall is a server mechanism that filters incoming requests for resources
  and services that it hosts.

body:
  A firewall is a server mechanism that filters incoming requests for resources
  and services that it hosts.

  Based on data about the requester, derived from the
  [TLS](/zk/Transport_Layer_of_Internet_Protocol.md) packet headers, the firewall
  decides whether or not to grant access to the requested resource.

  It will typically comprise three actions:

  - accept
  - drop
  - reject

  Accept is obvious. To "drop" means to block the traffic without sending a reply.
  To "reject" is to block the traffic but reply with an "unreachable" error.

  An example of a firewall rule would be to drop incoming traffic from IP
  addresses of non-technical employees to the SSH port (22) but allow technical
  staff to access it.

  Network traffic is matched agains a list of firewall rules in a sequence from
  first to last. As you cannot cover all cases, you must specify a default action
  when a rule is not matched.

  Whilst firewalls are focused on incoming traffic, you can also apply rules to
  outgoing traffic. A server will permit most outgoing traffic since, after all,
  it can trust itself however you may want to stop the server connecting to known
  malicious actors.

  ## Related software

  IPTables is the standard Linux software for managing firewalls. There is also
  Uncomplicated Firewall (UWF) which attaches to IPTables and simplifies the
  process.

  Another usefule software is Fail2ban which can automatically configure your
  firewall to block brute force login attempts and DDOS attacks.

raw_content:
  ---
  tags: [networks, server-management]
  created: Sunday, February 09, 2025
  ---

  # Firewalls

  A firewall is a server mechanism that filters incoming requests for resources
  and services that it hosts.

  Based on data about the requester, derived from the
  [TLS](/zk/Transport_Layer_of_Internet_Protocol.md) packet headers, the firewall
  decides whether or not to grant access to the requested resource.

  It will typically comprise three actions:

  - accept
  - drop
  - reject

  Accept is obvious. To "drop" means to block the traffic without sending a reply.
  To "reject" is to block the traffic but reply with an "unreachable" error.

  An example of a firewall rule would be to drop incoming traffic from IP
  addresses of non-technical employees to the SSH port (22) but allow technical
  staff to access it.

  Network traffic is matched agains a list of firewall rules in a sequence from
  first to last. As you cannot cover all cases, you must specify a default action
  when a rule is not matched.

  Whilst firewalls are focused on incoming traffic, you can also apply rules to
  outgoing traffic. A server will permit most outgoing traffic since, after all,
  it can trust itself however you may want to stop the server connecting to known
  malicious actors.

  ## Related software

  IPTables is the standard Linux software for managing firewalls. There is also
  Uncomplicated Firewall (UWF) which attaches to IPTables and simplifies the
  process.

  Another usefule software is Fail2ban which can automatically configure your
  firewall to block brute force login attempts and DDOS attacks.


# links

title: using API Gateway as Lambda trigger
href: Practical_walkthrough_Lambda_creation_within_AWS.md
type: markdown
snippet:
  See
  [using API Gateway as Lambda trigger](Practical_walkthrough_Lambda_creation_within_AWS.md)
  for a basic example of usage.


title: Fetch from Secrets Manager
href: Fetch_from_Secrets_Manager.md
type: markdown
snippet:
  See
  [Fetch from Secrets Manager](Fetch_from_Secrets_Manager.md)
  for a code example of retrieving a value from Secrets Manager.


title: factors and divisors
href: Factors_and_divisors.md
type: markdown
snippet:
  Given the symmetry between
  [factors and divisors](Factors_and_divisors.md) these
  properties are related. Note however that the LCM is more generic: it applies to
  any set of numbers not just fractions. Whereas the LCD is explicitly to do with
  fractions (hence 'denominator').


title: increase the complexity
href: Why_computers_use_binary.md#from-circuits-to-programs
type: markdown
snippet:
  Although a digital system could use more than two symbols, adding more would
  [increase the complexity](Why_computers_use_binary.md#from-circuits-to-programs)
  and cost of the system. A set of only two symbols allows for simplified hardware
  and improved reliability.


title: schema
href: Apollo_Server.md#example-schema
type: markdown
snippet:
  We will be working with the
  > [schema](Apollo_Server.md#example-schema) we defined
  > when working on the server


title: resolver
href: Apollo_Server.md#implementing-resolvers
type: markdown
snippet:
  Therefore, for each query in the schema we must write a frontend implementation.
  We do this with **query constants**. The frontend implementation has a backend
  analogue: the
  [resolver](Apollo_Server.md#implementing-resolvers)
  that is invoked when the frontend issues a query. The schema standardises this
  relationship so that every query on the client must have a corresponding
  resolver on the backend.


title: listener
href: Node_JS_events_module.md#extending-the-eventemitter-class
type: markdown
snippet:
  We instantiate an `ApolloServer` instance and pass our schema to it. We then
  subscribe to it with a
  [listener](Node_JS_events_module.md#extending-the-eventemitter-class).


title: function
href: Creating_a_GraphQL_server.md#resolvers
type: markdown
snippet:
  A resolver is a [function](Creating_a_GraphQL_server.md#resolvers) that
  populates data for a given query. It should have **the same name as the field
  for the query**. So far we have one query in our schema: `tracksForHome` which
  returns the tracks to be listed on the home page. We must therefore also name
  our resolver for this query `tracksForHome`.


title: generic example
href: Creating_a_GraphQL_server.md#resolvers
type: markdown
snippet:
  As per the [generic example](Creating_a_GraphQL_server.md#resolvers), you
  write write your resolvers as keys on a `resolvers` object, e.g:


title: resolver chains
href: Using_arguments_with_Apollo_Client.md#resolver-chains
type: markdown
snippet:
  Used with
      [resolver chains](Using_arguments_with_Apollo_Client.md#resolver-chains)
      ---add example


title: argument
href: Using_arguments_with_Apollo_Client.md
type: markdown
snippet:
  This time we utilise the `args` parameter in the resolver since an `id` will
    be provided as a client-side
    [argument](Using_arguments_with_Apollo_Client.md) to
    return a specific author.


title: React_useReducer
href: React_useReducer.md#refining-the-syntax
type: markdown
snippet:
  Now we need a reducer that will handle the state updates. We will just use the
  same setup as we used in the example of
  [React_useReducer](React_useReducer.md#refining-the-syntax):


title: logic gates
href: Logic_gates.md
type: markdown
snippet:
  The ALU comprises
  [logic gates](Logic_gates.md) that
  execute the instructions passed from memory and where the data stored by the
  registers is acted upon. A processor's ALU is just a complex combinatorial logic
  circuit.


title: full-adders and half adders
href: Half_adder_and_full_adder.md
type: markdown
snippet:
  It executes arithmetic and logical operations on binary numbers and where you
  will find operations conducted by
  [full-adders and half adders](Half_adder_and_full_adder.md)
  etc.


title: fetch, decode, execute cycle
href: Fetch_decode_execute.md
type: markdown
snippet:
  More specifically, the ALU is responsible for the _execute_ phase of the
  [fetch, decode, execute cycle](Fetch_decode_execute.md).


title: https://www.geeksforgeeks.org/user-mode-and-kernel-mode-switching/
href: https://www.geeksforgeeks.org/user-mode-and-kernel-mode-switching/
type: implicit
snippet:
  !! Add info on kernel mode and user mode
  https://www.geeksforgeeks.org/user-mode-and-kernel-mode-switching/


title: hexadecimal
href: Hexadecimal_number_system.md
type: markdown
snippet:
  To distinguish numbers in binary from decimal or
  [hexadecimal](Hexadecimal_number_system.md)
  numbers, it is common to use the prefix `0b`. Thus, e.g, `0b110` for decimal
  `6`.


title: binary number system
href: Binary_number_system.md
type: markdown
snippet:
  The equivalent entity in the
  [binary number system](Binary_number_system.md)
  is the **bit**. For example the binary number 110 has three bits. A bit can only
  have one of two values in contrast to a digit which can have one of ten values.
  These values are 0 and 1.


title: standard metric prefixes
href: Prefixes_for_units_of_electrical_measurement.md
type: markdown
snippet:
  Having established that the core quantity of information is the byte, the
  convention is to apply the
  [standard metric prefixes](Prefixes_for_units_of_electrical_measurement.md)
  to the byte to establish units:


title: Commutative Law
href: Whole_numbers.md#the-commutative-property
type: markdown
snippet:
  Compare the
  [Commutative Law](Whole_numbers.md#the-commutative-property)
  in the context of arithmetic.


title: Associative Law
href: Whole_numbers.md#the-associative-property
type: markdown
snippet:
  Compare the
  [Associative Law](Whole_numbers.md#the-associative-property)
  in the context of arithmetic.


title: Distributive Law applies in the case of algebra based on arithmetic
href: Distributivity.md
type: markdown
snippet:
  Compare how the
  [Distributive Law applies in the case of algebra based on arithmetic](Distributivity.md):


title: DeMorgan's Laws
href: DeMorgan's_Laws.md
type: markdown
snippet:
  In addition we have
  [DeMorgan's Laws](DeMorgan's_Laws.md) which express
  the relationship that obtains between the negations of conjunctive and
  disjunctive expressions:


title: logic gates
href: Logic_gates.md
type: markdown
snippet:
  The fact that we can take a complex Boolean function and reduce it to a simpler
  formulation has great significance for the development of computer
  architectures, specifically
  [logic gates](Logic_gates.md). It
  would be rather resource intensive and inefficient to create a gate that is
  representative of the complex function. Whereas the simplified version only
  requires a single
  [OR gate](Logic_gates.md#or-gate).


title: logic circuits
href: Digital_circuits.md
type: markdown
snippet:
  This is an important skill that we will use when constructing
  [logic circuits](Digital_circuits.md).
  We will go from truth conditions (i.e. what we want the circuit to do and when
  we want it to do it) to a function expression which is then reduced to its
  simplest form and implemented with
  [logic gates](Logic_gates.md).
  Specifically, NAND gates.


title: idempotence
href: Boolean_algebra.md#idempotent-law
type: markdown
snippet:
  Notice that $\lnot(z)$ is repeated so we can remove the repetition through
  [idempotence](Boolean_algebra.md#idempotent-law):


title: NAND gate
href: Logic_gates.md#nand-gate
type: markdown
snippet:
  Finally, we can simplify even further by doing away with AND and NOT and using a
  single
  [NAND gate](Logic_gates.md#nand-gate)
  which embodies the logic of both, being true in all instances where AND would be
  false: $\lnot (x \land  y)$.


title: trkjuth table
href: Truth-tables.md
type: markdown
snippet:
  We can compute all possible outputs of the function by constructing a
  [trkjuth table](Truth-tables.md) with each possible
  variable as the truth conditions and the output of the function as the truth
  value:


title: memory
href: Memory.md
type: markdown
snippet:
  | Bus type      | Description                                                                                                                                                                                                        |
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | System bus    | The primary pathway between the CPU and [memory](Memory.md). It comprises the **data bus** that transfers data from the memory to the CPU and the **address bus** which transmits requests from the CPU to memory. |
  | Internal bus  | Connects local devices for example the harddisk to the CPU.                                                                                                                                                        |
  | External bus  | Connects peripheral devices such as disks and printers to the [motherboard](Motherboard.md)                                                                                                                        |
  | Expansion bus | Allows expansion boards to access the CPU and memory.                                                                                                                                                              |
  | Frontside bus | Main computer bus that determines data transfer rate speed and is the primary data transfer path between the CPU, RAM and other [motherboard](Motherboard.md) devices.                                             |
  | Backside bus  | Transfers secondary cache (L2 cache) data at faster speeds, allowing more efficient CPU operations                                                                                                                 |


title: capacitors
href: Memory.md
type: markdown
snippet:
  This is the part of the CPU that stores data. The memory cells that comprise it
  do not have [capacitors](Memory.md) (unlike RAM)
  so they cannot store very much data but they work faster, which is what is
  important. Because their memory capacity is so small, we measure the size of
  registers in bits rather than bytes.


title: memory hierarchy
href: Memory.md#the-memory-hierarchy
type: markdown
snippet:
  In terms of speed, registers sit at the top part of the overall
  [memory hierarchy](Memory.md#the-memory-hierarchy).


title: controller
href: Chipset_and_controllers.md
type: markdown
snippet:
  The CPU's [controller](Chipset_and_controllers.md). It
  takes the instructions in binary form from RAM memory (separate from the CPU,
  but connected) and then signals to the to ALU and memory registers what it is
  supposed to do to execute the instructions. Think of it as the overseer that
  gets the ALU and registers to work together to run program instructions.


title: logic gates
href: Logic_gates.md
type: markdown
snippet:
  The clock's circuitry is based on a quartz crystal system like that used in
  watches. At precisely timed intervals, the clock sends out pulses of electricity
  that cause bits to move from place to place within
  [logic gates](Logic_gates.md) or
  between logic gates and
  [registers](CPU_architecture.md#registers). This is
  covered in greater detail in the discussion of
  [clock signals in digital circuits](Clock_signals.md).


title: kernel
href: The_kernel.md
type: markdown
snippet:
  Each "cycle" is the execution of a process that commences once the
  [kernel](The_kernel.md) hands control to the CPU. Each cycle
  follows a sequence of events known as
  [fetch, decode, and execute](Fetch_decode_execute.md).


title: electromagentic waves
href: Electromagnetism.md
type: markdown
snippet:
  Hertz was the scientist who detected
  [electromagentic waves](Electromagnetism.md).
  We use Hertz as a measure of the frequency of electromatic wave cycles in a
  signal.


title: arguments
href: Passing_arguments_and_options_to_Bash_scripts.md
type: markdown
snippet:
  Here we test that the right number of
  [arguments](Passing_arguments_and_options_to_Bash_scripts.md)
  have been passed to the script:


title: electrical field
href: Voltage.md#distinguishing-voltage-from-electric-field
type: markdown
snippet:
  In this configuration the same current flows through all the cells; it is not
  cumulative. We represent this as follow> However the voltage is cumulative: it
  is the _sum_ of the individual cell voltages, represented below as
  [electrical field](Voltage.md#distinguishing-voltage-from-electric-field):


title: remote tracking branch
href: Remote_tracking_branches.md
type: markdown
snippet:
  You don't have to just cherry-pick locally, you can also cherry-pick from a
    [remote tracking branch](Remote_tracking_branches.md).


title: motherboard
href: Motherboard.md
type: markdown
snippet:
  The chipset manages the data flow between the different components that comprise
  the [motherboard](Motherboard.md): processor,
  [memory](Memory.md),
  [harddisk](What_are_disks.md) and peripherals.


title: system bus
href: Bus.md
type: markdown
snippet:
  Buses run in and out of the chipset into these key motherboard components. The
  main chipset is a kind of junction that sits between the memory and CPU through
  which the [system bus](Bus.md) passes.


title: duck typing
href: Custom_types_in_TypeScript.md#duck-typing
type: markdown
snippet:
  You shouldn't confuse `implements` with `extends`. `implements` just checks the
  class as an interface in accordance with the principles of
  [duck typing](Custom_types_in_TypeScript.md#duck-typing):
  i.e the implementing class should have the same properties and methods. It
  doesn't affect anything internal to the methods or properties. So e.g, if you
  typed a method parameter as `string` in the base class, this would still default
  to `any` in the derived class.


title: electromagnetic
href: Electromagnetism.md
type: markdown
snippet:
  A single iteration of the volatage rising and falling is a **pulse**. A complete
  oscillation from low to high and back to low is a **cycle**. As with all
  [electromagnetic](Electromagnetism.md)
  signals we measure the frequency of the wave in Hertz: cylcles per second. We
  also further distinguish the rising and falling edge of a pulse. Rising
  represents the signal passing from ground to its maximum voltage and falling is
  the reverse (the electrons moving from the voltage source to ground).


title: CPU
href: CPU_architecture.md#the-system-clock
type: markdown
snippet:
  The role of the clock is essential in the functioning of the
  [CPU](CPU_architecture.md#the-system-clock). It is
  the system clock that gives CPUs their performance rating: how many processes
  can execute within a given clock cycle.


title: principle of the immutability of elements
href: Elements-992594b9cd2e483c85cddddffeb16f11
type: markdown
snippet:
  We change components by using state, not by mutating props. This is consistent
  with React's
  [principle of the immutability of elements](Elements-992594b9cd2e483c85cddddffeb16f11).


title: kernal
href: The_kernel.md
type: markdown
snippet:
  Containers are native to the Linux [kernal](The_kernel.md)
    and are key part of how it works. Thus when you run containers on Linux, you
    are using native capability. When you use containers on Windows or Mac you
    have to run a virtual version of Linux in order to exploit the capabilities of
    that kernel. (Docker provides this)


title: user space
href: User_Space.md
type: markdown
snippet:
  In ordinary [user space](User_Space.md) applications share
  the _same_ processor, memory and file system resources. This increases the
  likelihood of resourcing challenges, dependency conflicts and security threats.
  Without modularisation and the titration of resources, you are opened up to much
  greater possibility of failure.


title: data type
href: Data_types_in_MySQL.md
type: markdown
snippet:
  Below is an example of this in practice. Each field corresponds to a column. We
  specify the name of the field and its corresponding
  [data type](Data_types_in_MySQL.md). Every table must have a
  **primary key**. In the example, `employee_id` is the primary key.


title: collections and documents
href: MongoDB_Introduction.md
type: markdown
snippet:
  In order start adding
  [collections and documents](MongoDB_Introduction.md) to our database,
  we use Mongoose's **schema** structure. (This is specific to Mongoose and is not
  a structure that is a part of Mongo in general.)


title: separate entry
href: Validating_Mongoose_schemas.md
type: markdown
snippet:
  Note that we set our validation criteria as the second property for each
  > schema value. There is more info info on validation in a
  > [separate entry](Validating_Mongoose_schemas.md);


title: event emitter
href: Events module.md#event-emitters
type: markdown
snippet:
  We create an [event emitter](Events%20module.md#event-emitters) and listener
  that listens for GET requests on a specified port and sends data in response to
  requests.


title: my notes
href: Connect_to_Mongo_database.md
type: markdown
snippet:
  We will follow the routine for establishing a MongoDB instance as detailed in
  [my notes](Connect_to_Mongo_database.md) on Mongo:


title: Querying a collection
href: Querying_a_Mongo_collection.md
type: markdown
snippet:
  Now we need to rewrite our RESTful request handlers so that the data is sourced
  from and added to the database. We will mainly be using the Mongo syntax defined
  at [Querying a collection](Querying_a_Mongo_collection.md) and
  [Adding documents to a collection](Adding_documents_to_a_Mongo_collection.md).
  We will also keep API validation within the `/model/` file.


title: query-first
href: Update_a_Mongo_document.md#query-first-document-update
type: markdown
snippet:
  When updating a value in the database we are going to use the
  [query-first](Update_a_Mongo_document.md#query-first-document-update)
  approach to updating a Mongo document.


title: HTTP request types
href: HTTP_request_types.md
type: markdown
snippet:
  Express provides us with methods corresponding to each of the
  [HTTP request types](HTTP_request_types.md):


title: MongoDB database
href: 05_ Integrating_the_database.md
type: markdown
snippet:
  Typically when you create a RESTful API you are going to be returning data
  > from a database. For simplicity we are just going simulate this with a simple
  > data array so that we can focus on the Express syntax rather than database
  > handling. Later we will integrate this with a
  > [MongoDB database](05_%20Integrating_the_database.md).


title: middleware
href: Middleware_in_NodeJS.md
type: markdown
snippet:
  We first create an instance of Express within `index.js`. This will be the main
  coordinating file and we will aim to minimise the amount of business logic we
  have in this file. It should really just be for initialization and managing
  [middleware](Middleware_in_NodeJS.md).


title: Joi validator
href: Validation_in_NodeJS.md
type: markdown
snippet:
  We should accept alterations to the database that are not first validated. We
  can use the
  [Joi validator](Validation_in_NodeJS.md) to vet
  the request:


title: difference of potential
href: Voltage.md
type: markdown
snippet:
  When there is an excess of electrons at one terminal (i.e. negatively charged
  atoms) and a deficiency of electrons at the other terminal (i.e. positively
  charged atoms), a [_difference of potential_](Voltage.md) exists between the two
  terminals.


title: transistor
href: Transistors.md
type: markdown
snippet:
  In a DRAM cell, each bit of data is stored as a charge in a capacitor. The
  presence of charge represents a '1' bit and the absence of charge represents a
  '0' bit. Each of these cells is paired with a [transistor](Transistors.md) that
  controls the reading and writing of data.


title: charge
href: Current.md
type: markdown
snippet:
  However capacitors lose [charge](Current.md) over time due to leaks. As a result
  DRAM is memory that needs to be refreshed (recharged) frequently. For this
  reason and because it only uses one transistor and capacitor per bit, DRAM is
  the less expensive form of volatile memory.


title: flip flops
href: Flip_flops.md
type: markdown
snippet:
  SRAM uses [flip flops](Flip_flops.md) to store the bits. It also uses multiple
  transistors per bit. This makes it faster than DRAM but more expensive. DRAM is
  at least ten times slower than SRAM.


title: mode
href: File_permissions_and_execution_in_Bash.md#what-the-output-means
type: markdown
snippet:
  The
  [mode](File_permissions_and_execution_in_Bash.md#what-the-output-means)
  is different from ordinary files. Each device file is prepended with
  `b, p, c, s` before the standard permissions. These stand for the major types of
  devices: _block, character, pipe_ and _socket_.


title: bash scripting
href: Redirect_to_dev_null.md
type: markdown
snippet:
  `/dev/null` is a virtual device: it doesn't actually exist as a piece of
  hardware on the system. It can be useful when
  [bash scripting](Redirect_to_dev_null.md) as a
  place to direct output that you don't care about, for example errors or verbose
  program read-outs.


title: reciprocol
href: Reciprocals.md
type: markdown
snippet:
  We combine the foregoing (that it is easier to divide by fractional amounts
  using multiplication) with the concept of a [reciprocol](Reciprocals.md) to
  arrive at a definitive method for dividing two fractions. It boils down to:
  _invert and multiply_:


title: REST API
href: RESTful_APIs.md
type: markdown
snippet:
  The Docker Client is a thin API for making
    [REST API](RESTful_APIs.md) to the Docker Server. Any CLI
    command beginning `docker...` is an API request to the server.


title: foreign_keys
href: Foreign_keys_in_SQL.md
type: markdown
snippet:
  DynamoDB is "NoSQL" because it does not support #SQL queries and is
  non-relational meaning there cannot be JOIN operations via
  [foreign_keys](Foreign_keys_in_SQL.md)


title: zk/Docker_architecture
href: zk/Docker_architecture
type: wiki-link
snippet:
  Cloud-based or virtual server (virtual machine), basically a hypervisor
    (compare [[zk/Docker_architecture]])


title: electric current
href: Current.md
type: markdown
snippet:
  Magnetism is a physical property produced by the _motion_ of electric charge,
  > which of course, is the same thing as
  > [electric current](Current.md)


title: shell session
href: Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6
type: markdown
snippet:
  Every time a [shell session](Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6)
    spawns, a process takes place to gather and compile information that should be
    available to the shell process and its child processes. It obtains the data
    for these settings from a variety of different files and settings on the
    system.


title: shell session
href: Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6
type: markdown
snippet:
  You can also add variables to config files that run on login such as your user
  `.bashrc` / `.zshrc` . This is obviously best for when you want the variables to
  persist and be accessible within every
  [shell session](Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6).


title: solution
href: Algebra key terms.md#678811
type: markdown
snippet:
  Two equations are equivalent if they have the same
  > [solution](Algebra%20key%20terms.md#678811) set.


title: solution
href: Algebra key terms.md#678811
type: markdown
snippet:
  $$x \cdot 3 = 18  $$
  The [solution](Algebra%20key%20terms.md#678811) to this equation is $6$.
  $$\frac{x
  \cdot 3}{3} = \frac{18}{3}
  $$


title: kernel
href: The_kernel.md
type: markdown
snippet:
  A running Node application is a single running process. Like everything that
  happens within the OS, a process is managed by the
  [kernel](The_kernel.md) that dispatches operations to the CPU
  in a clock cycle. A thread is a sequence of code that resides within the process
  and utilises its memory pool (the amount of memory assigned by the kernel to the
  Node process). The Event Loop runs on CPU ticks: a tick is a single run of the
  Event Loop.


title: call stack
href: Call_stack.md
type: markdown
snippet:
  The Event Loop comprises six phases. The Event Loop starts at the moment Node
  begins to execute your `index.js` file or any other application entry point.
  These six phases create one cycle, or loop, equal to one **tick**. A Node.js
  process exits when there is no more pending work in the Event Loop, or when
  `process.exit()` is called manually. A program only runs for as long as there
  are tasks queued in the Event Loop, or present on the
  [call stack](Call_stack.md).


title: call stack
href: Call_stack.md
type: markdown
snippet:
  At the beginning of this phase the Event Loop updates its own time. Then it
       checks a queue, or pool, of timers. This queue consists of all timers that
       are currently set. The Event Loop takes the timer with the shortest wait
       time and compares it with the Event Loop's current time. If the wait time
       has elapsed, then the timer's callback is queued to be called once the
       [call stack](Call_stack.md) is empty.


title: https://blog.appsignal.com/2022/07/20/an-introduction-to-multithreading-in-nodejs.html
href: https://blog.appsignal.com/2022/07/20/an-introduction-to-multithreading-in-nodejs.html
type: implicit
snippet:
  https://blog.appsignal.com/2022/07/20/an-introduction-to-multithreading-in-nodejs.html
  https://school.geekwall.in/p/Bk2xFs1DV


title: Application Layer
href: Application_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  The web browser knows HTTP - a protocol of the
    [Application Layer](Application_Layer_of_Internet_Protocol.md) - and forms an
    HTTP request intended for the destination server.


title: operating system
href: Basic_model_of_the_operating_system.md
type: markdown
snippet:
  The browser hands off the HTTP request to the TCP/IP software stack of the
    device's [operating system](Basic_model_of_the_operating_system.md), asking
    that the data be delivered to the server on its IP address and at port 80.


title: Transport Layer
href: Transport_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  The TCP/IP software stack on the client OS encapsulates the HTTP payload in a
    TCP segment (at the
    [Transport Layer](Transport_Layer_of_Internet_Protocol.md)), setting the
    destination port to 80 in the segment header.


title: Internet Layer
href: Internet_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  The [Internet Layer](Internet_Layer_of_Internet_Protocol.md) software on the
    client then wraps the TCP segment in an IP packet, which includes the
    destination IP address of the server in the packet header.


title: Link Layer
href: Link_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  At the [Link Layer](Link_Layer_of_Internet_Protocol.md) of the client device,
    the IP packet is encapsulated in a frame with the
    [MAC_address](MAC_addresses.md) of the local router in its header. The frame
    is wirelessly transmitted by the client device's WiFi hardware.


title: variables
href: Variables_and_data_types_in_Bash.md
type: markdown
snippet:
  We use most frequently for returning the value of stored
  [variables](Variables_and_data_types_in_Bash.md).
  Techically we do not have to use the braces, we can retrieve with just `$var`
  however it's better to use them to minimise interpretation fuck-ups which happen
  a lot.


title: sub-shell
href: Shell_sessions.md
type: markdown
snippet:
  Command substitution (circle-brackets) allows us to put the output of one
  command inside another. Bash runs the bracketed command in a
  [sub-shell](Shell_sessions.md) and then returns it
  to the main user shell.


title: equivalent
href: Equivalent fractions.md
type: markdown
snippet:
  When we divide by the common divisor is acts as a divisor. When we multiply by
  the common divisor it acts as a factor. The fact that the fractions are
  [equivalent](Equivalent%20fractions.md) in both cases indicates that the
  properties are equivalent.


title: redirect
href: Redirection_in_Bash.md
type: markdown
snippet:
  They are typically used when you want to
  [redirect](Redirection_in_Bash.md) the output of the
  standard/input /output/error somewhere, e.g a file or as input to another
  program. A classic case is `[some_command] > /dev/null 2>&1`


title: $0
href: Passing_arguments_and_options_to_Bash_scripts.md#passing-arguments
type: markdown
snippet:
  They are all technically "files" which are open and which append themselves to
  every process that can run in the shell. For any command or program that you
  run, you will be able to access `0`, `1` and `2` for them. In this way they are
  similar to variables like
  [`$0`](Passing_arguments_and_options_to_Bash_scripts.md#passing-arguments)
  and
  [`$@`](Passing_arguments_and_options_to_Bash_scripts.md#passing-arguments).
  They have a universal meaning within the context of the shell runtime.


title: database
href: Basic_database_concepts.md
type: markdown
snippet:
  A filesytem is a form of [database](Basic_database_concepts.md); it
  > supplies the structure to transform a simple block device into the
  > sophisticated hierarchy of files and subdirectories that users can understand.


title: swap
href: Swap_space.md
type: markdown
snippet:
  It shows my root and home filesystems and my
  [swap](Swap_space.md) file. Note that we use the UUID
  to name the partition rather than its name in `/dev/`. The order of the
  parameters is as follows:


title: syntactic
href: Syntax_of_sentential_logic.md
type: markdown
snippet:
  Derivation rules are
  [syntactic](Syntax_of_sentential_logic.md) rather
  than semantic. They are applied on the basis of their form rather than on the
  basis of the truth conditions of the sentences they are applied to.


title: cherry-picking
href: Cherry_picking_a_branch.md
type: markdown
snippet:
  The main difference between the two approaches is that
  [cherry-picking](Cherry_picking_a_branch.md) is a more selective
  process, where you can pick and choose specific commits that you want to include
  in another branch. This can be useful when you only want to apply specific
  changes or fixes from one branch to another, without including all the changes
  made in the original branch.


title: logic gates
href: Logic_gates.md
type: markdown
snippet:
  The half adder and full adder are components of digital circuits that enable us
  to carry out binary addition. Using adders and half adders we can add two binary
  numbers together. Adders are a type of [integrated circuit]() comprising certain
  [logic gates](Logic_gates.md) where the arrangement allows for the
  representation of the addition of bits.


title: XOR
href: Logic_gates.md#xor-gate
type: markdown
snippet:
  We can see that the sum bit column replicates the truth-conditions of
  [XOR](Logic_gates.md#xor-gate):


title: equivalent
href: Equivalent fractions.md
type: markdown
snippet:
  Let $a,b$ be any integers. The following three fractions are
  > [equivalent](Equivalent%20fractions.md):
  > $$\frac{-5}{15}, \frac{5}{-15}, - \frac{5}{15}$$


title: hardware simulator
href: Hardware_simulation.md
type: markdown
snippet:
  The hardware designer specifies a chip's logic by writing an HDL program which
  is then rigorously tested. At this stage, a
  [hardware simulator](Hardware_simulation.md) takes the
  HDL program as input and creates a software representation of the chip logic.
  The designer can instruct the simulator to test the virtual chip on various sets
  of inputs. This is done to check the chip's functionality but also to benchmark
  a variety of other parameters such as speed of computation and energy
  consumption.


title: input and output pins
href: Integrated_circuits.md
type: markdown
snippet:
  In an HDL program we distinguish internal pins along with the standard
  [input and output pins](Integrated_circuits.md).
  At the level of the interface, we are concerned only with input and output pins
  (in the example program these are `a`, `b` and `out`). It is at the level of the
  implementation that internal pins are encountered. In the example these are the
  connections between, e.g. the AND and NOT gates such as
  `And (a=a, b-notb, out=w1)`. This means the AND gate is receiving through its
  `a` pin the input `a` value and through its `b` pin the value of `b` inverted by
  a NOT. `out` is the value that is computed based on the input pins of `a` and
  `b`.


title: Boolean function
href: Boolean_functions.md
type: markdown
snippet:
  Along with the HDL file we also create a test file. This runs the chip against
  the inputs we supply, these will typically be equivalent to the (left-hand)
  truth-values column in a truth table which is the same as the parameters passed
  to a [Boolean function](Boolean_functions.md), for
  example:


title: Memory_leaks
href: Memory_leaks
type: wiki-link
snippet:
  Whereas stack memory with it's LIFO structure has memory management built-in
  when programs allocate memory from the heap they must manually deallocate it
  when it is no longer required. This process of "freeing memory" is known as
  _garbage collection_. In a language like C, this is the explicit concern of the
  programmer and is not abstracted away. Failure to properly manage garbage
  collection is what causes [[Memory_leaks]].


title: equivalent
href: Equivalent fractions.md
type: markdown
snippet:
  Whenever we increase a fraction, the resultant fraction will always be
  > [equivalent](Equivalent%20fractions.md) to the fraction we started with.


title: Arithmetic_Logic_Unit
href: Arithmetic_Logic_Unit
type: wiki-link
snippet:
  A family of CPUs that implement the core instructions of the
    [[Arithmetic_Logic_Unit]] in the same way share an ISA. Any software built for
    that ISA will work on any CPU that implements the ISA


title: word-size
href: Signed_and_unsigned_numbers.md
type: markdown
snippet:
  There have been different, successive generations of x86 corresponding to
    their [word-size](Signed_and_unsigned_numbers.md): 16-bit, 32-bit, 64-bit.
    Word size here just means how many bits the processor can work with at a time.
    A 34-bit processor can operate on values that are 32 bits in length. This
    means it has 32bit [[CPU_architecture#registers|registers]], a 32-bit data
    [[Bus|bus]], a 32-bit address bus and so on.


title: Internet Protocol (IP) addresses
href: IP_addresses.md
type: markdown
snippet:
  The Internet Layer utilises the **Internet Protocol** to determine how devices
  will be publicly identified to devices on other networks and how different
  devices on the same local network will be distinguished from outside of this
  network. This is achieved through
  [Internet Protocol (IP) addresses](./IP_addresses.md).


title: Link Layer
href: Link_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  Data is sent accross the internet between hosts as _packets_. These packets,
  when sent and received within the
  [Link Layer](Link_Layer_of_Internet_Protocol.md) on the local network, are
  enclosed within a Link Layer frame (in its payload section):


title: Link Layer
href: Link_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  The [Link Layer](Link_Layer_of_Internet_Protocol.md) concerns communication
    between devices on the same local network. The transfer of information once it
    has been received from the internet or its transfer between devices before it
    sent out into the internet. Ethernet and WiFi are two core protocols utilised
    at this layer.


title: Internet Layer
href: Internet_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  The [Internet Layer](Internet_Layer_of_Internet_Protocol.md) is concerned with
    communication accross networks. It is responsible for identifying hosts on the
    inter-network by their addresses and routing data from network to network.


title: Transport Layer
href: Transport_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  The [Transport Layer](Transport_Layer_of_Internet_Protocol.md) creates a
    commmunication channel between two hosts using ports and sockets.


title: Application Layer
href: Application_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  The [Application Layer](Application_Layer_of_Internet_Protocol.md) concerned
    with software that utilises information received and sent over the internet,
    for instance web pages and emails. This is the highest level of abstraction
    for which all the lower levels serve as "plumbing". Examples of protocols
    operative at the Application Layer include HTTP and SSH.


title: sort
href: Sorting_lists_in_Python.md
type: markdown
snippet:
  Assuming the sub-lists have an identical structure, you can
  [sort](Sorting_lists_in_Python.md) them by
  a common property by passing a
  [lambda function](Lambdas_in_Python.md) to
  the `key` value of `sorted()` and `.sort()`.


title: map
href: Map_and_filter_in_Python.md
type: markdown
snippet:
  Below we use
  [map](Map_and_filter_in_Python.md) and a
  [lambda function](Lambdas_in_Python.md) to
  convert the first element of each iner list from a Unix timestamp to a readable
  string:


title: list comprehension
href: List_comprehension_in_Python.md
type: markdown
snippet:
  We could also use
  [list comprehension](List_comprehension_in_Python.md)
  to achieve the same outcome:


title: dictionary comprehension
href: List_comprehension_in_Python.md#dictionary-comprehension
type: markdown
snippet:
  Accordingly, we create a dictionary which uses the unique key in each list as
  the key of each dictionary entry via
  [dictionary comprehension](List_comprehension_in_Python.md#dictionary-comprehension)
  that loops through each value in the inner lists of the multidimensional array.
  We then parse the values of the dictionary into a list.


title: CREATE TABLE
href: Create_an_SQL_table.md
type: markdown
snippet:
  The output will be represented as a table but it is virtual, not an actual
  table. (If you wish to actually create a table or a view off the back of a join
  operation you should combine the join with the
  [`CREATE TABLE`](Create_an_SQL_table.md) command etc.)


title: REST APIs
href: RESTful_APIs.md#rest
type: markdown
snippet:
  The best way to think of GraphQL architecturally is to think of it as a
  > different technique for instantiating the _uniform interface_, _client/server
  > decoupling_, and _layered-system architecture_ contraints of traditional
  > [REST APIs](RESTful_APIs.md#rest). However, instead of making
  > GET or POST requests to a REST endpoint URL and passing parameters, you send a
  > structured query object.


title: resistor
href: Resistance.md#resistors
type: markdown
snippet:
  An LED diode lights up when the right amount of current flows through it. A
  standard LED has a maximum current of 20mA. An appropriate
  [resistor](Resistance.md#resistors)
  must therefore be added to the circuit to ensure the current doesn't exceed this
  amount.


title: map, filter
href: Map_and_filter_in_Python.md
type: markdown
snippet:
  They are most often used unnamed with the functional methods
  [map, filter](Map_and_filter_in_Python.md)
  and reduce.


title: NOR
href: Logic_gates.md#nor-gate
type: markdown
snippet:
  The circuit diagram latch symbol obviously encapsulates more complex
  functionality that occurs at the sub-circuit level. We will demonstrate how this
  functionality can be achieved with two
  [NOR](Logic_gates.md#nor-gate) gates.


title: hosts
href: Network_hosts.md
type: markdown
snippet:
  The Link Layer is the lowest level of the network stack that makes up the
  > Internet Protocol Suite. It is concerned with the physical and logical
  > connections between [hosts](./Network_hosts.md) on the same local network.


title: Media Access Control (MAC) address
href: MAC_addresses.md
type: markdown
snippet:
  Each device on a link has a network address that uniquely identifies it. For
  most Link Layer Protocols this is a
  [Media Access Control (MAC) address](MAC_addresses.md).


title: superuser
href: User_Space.md#root-user-superuser
type: markdown
snippet:
  This is the domain of the [superuser](User_Space.md#root-user-superuser). The
    part of the filesystem that you need sudo priveleges to access and where you
    manage users


title: kernel
href: The_kernel.md
type: markdown
snippet:
  Most standard partition tables allow for primary, extended and logical
  partitions. The primary partition is the part of the harddisk that contains the
  operating system and is thus described as 'bootable' and may be called the 'boot
  partition'. During the bootstrapping process this is injected into memory as the
  [kernel](The_kernel.md).


title: map and filter
href: Map_and_filter_in_Python.md
type: markdown
snippet:
  Since its introduction to the language, the same functionality has become
  achievable by using functional methods like
  [`map` and `filter`](Map_and_filter_in_Python.md),
  utilising [lambdas](Lambdas_in_Python.md)
  however list comprehension is often more straightforward and easier to read.


title: test
href: Test_values_in_Bash.md
type: markdown
snippet:
  Here we pass all the elements of the array to a
  [test](Test_values_in_Bash.md) condition which
  tests for an empty string.


title: function
href: Functions_in_Bash.md
type: markdown
snippet:
  When you pass an array as an argument to a
  [function](Functions_in_Bash.md) it will not
  immediately be understood to be an array.


title: loop through each character in a string
href: Strings_in_Bash.md#loop-through-each-character-in-a-string
type: markdown
snippet:
  We are leveraging this aspect of Bash when we
  [loop through each character in a string](Strings_in_Bash.md#loop-through-each-character-in-a-string).


title: pins
href: Integrated_circuits.md
type: markdown
snippet:
  Logic gates are the basic building blocks of digital computing. **A logic gate
  is an electrical circuit that has one or more than one input and only one
  output.** The input and output points of the gate are
  [pins](Integrated_circuits.md) The
  input controls the output and the logic determining which types of input
  (on/off) lead to specific outputs (on/off) is isomorphic with the
  truth-conditions of the
  [Boolean connectives](Truth-functional_connectives.md) specifiable in
  terms of [truth tables](Truth-tables.md).


title: transistor
href: Transistors.md
type: markdown
snippet:
  Physically, what 'travels through' the gates is electrical current and what
  constitutes the 'gate' is a
  [transistor](Transistors.md)
  responding to the current. Going up a level of abstraction, the current/ charge
  is identified with a
  [bit](Binary_units_of_measurement.md#binary-units-of-measurement).
  It is bits that go into the gate and bits which come out: binary information
  that may be either 1 or 0.


title: Adders
href: Half_adder_and_full_adder.md
type: markdown
snippet:
  An example of a composite gate would be a three-way AND. An AND with three
  inputs rather than the standard two that furnish the elementary AND gate. This
  gate would output 1 when all three gates have the value 1 and 0 otherwise.
  [Adders](Half_adder_and_full_adder.md)
  and [latche>s](Latches.md) whilst
  being
  [integrated circuits](Integrated_circuits.md)
  are also, technically speaking, composite gates.


title: hardware abstraction
href: Hardware_abstraction_and_modularity.md
type: markdown
snippet:
  Importantly, a single interface may be implemented in a variety of ways. There
  > is a one-to-many relationship at work here. From the point of view of the user
  > interface these differences should not be detectable. This is another example
  > of
  > [hardware abstraction](Hardware_abstraction_and_modularity.md)


title: contradiction
href: Logical_truth_and_falsity.md#logical-falsity
type: markdown
snippet:
  A
  [contradiction](Logical_truth_and_falsity.md#logical-falsity)
  has very important consequences for reasoning because if a set of propositions
  is inconsistent, any other proposition is derivable from it.


title: negation elimination
href: Negation_Elimination.md
type: markdown
snippet:
  Here we want to derive some proposition $Q$. If we can derive a contradiction
  from its negation as an assumption then, by the
  [negation elimination](Negation_Elimination.md)) rule, we can
  assert $Q$. This is why contradictions should be avoided in arguments, they
  'prove' everything which, by association, undermines any particular premise you
  are trying to assert.


title: derivation
href: Formal proofs in propositional logic.md
type: markdown
snippet:
  Propositions $P$ and $Q$ are equivalent in a system of
  > [derivation](Formal%20proofs%20in%20propositional%20logic.md) for
  > propositional logic if $Q$ is derivable from $P$ and $P$ is derivable from
  > $Q$.


title: material biconditional
href: Biconditional_Introduction.md
type: markdown
snippet:
  Note that the property of equivalence stated in terms of derivablity above is
  identical to the derivation rule for the
  [material biconditional](Biconditional_Introduction.md):


title: consistently
href: Consistency.md
type: markdown
snippet:
  A proposition is logically indeterminate if it is neither logically true or
  logically false. This is to say: it can be both [consistently](Consistency.md)
  asserted and consistently denied.


title: logical consistency
href: Logical_consistency.md
type: markdown
snippet:
  In distinguishing the properties of
  [logical consistency](Logical_consistency.md) and
  [validity](Validity_and_entailment.md) we make tacit use
  of the notion of **possibility**. This is because when we consider the validity
  of an argument we are assessing truth-conditions and this consists in asking
  ourselves what could or could not be the case: were it such that _P_, then it
  would be the case that _Q_. It is important to understand what possibility means
  in the context of logic and how it differs from what we might mean ordinarily
  when we use the term.


title: logical truth
href: Logical_truth_and_falsity.md#logical-truth
type: markdown
snippet:
  A proposition is _logically necessary_ if it is true in every logically possible
  circumstance which is to say: true on every possible truth functional
  assignment. Necessity and
  [logical truth](Logical_truth_and_falsity.md#logical-truth)
  are therefore synonyms: anything that is logically true (a tautology) is true by
  necessity (could not be otherwise.)


title: consistency
href: Logical_consistency.md
type: markdown
snippet:
  Neither proposition can be true because the truth of the first clause is
  contradicted by the second. By the principle of
  [consistency](Logical_consistency.md), it is not
  possible for both clauses to be true at once therefore the proposition, overall
  has the truth value of false.


title: validity
href: Validity_and_entailment.md
type: markdown
snippet:
  If an argument contains premises which are logically false than this argument
    will perforce be valid. This is because one cannot consistently assert the
    premises and deny the conclusion which is the definition of
    [validity](Validity_and_entailment.md). However the
    _reason_ why one cannot consistently assert the premises and deny the
    conclusions is because one cannot consistently assert the premises - they
    conflict with each other. Furthermore as the argument contains false premises,
    it cannot be sound.


title: local network
href: Link_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  Each device on a [local network](./Link_Layer_of_Internet_Protocol.md) has a MAC
  as a unique identifier. It is a hardware-based, physical attribute of the
  device, typically permanently encoded onto a non-volatile memory chip attached
  to the ![network_card](Network_card.md).


title: hexadecimal_digits
href: Hexadecimal_number_system.md
type: markdown
snippet:
  MAC addresses consist of 6 bytes (48-bits) represented as 12
  [hexadecimal_digits](Hexadecimal_number_system.md).


title: ARM ISA
href: Instruction_set_architectures
type: wiki-link
snippet:
  The following machine instruction is an instruction that would be understood by
  an [[Instruction_set_architectures| ARM ISA]]. It moves the number `4` into the
  `r7` register:


title: Hexadecimal_number_system
href: Hexadecimal_number_system
type: wiki-link
snippet:
  Binary sequences are hard to understand, even if converted to the
  [[Hexadecimal_number_system]]. We have a better way of managing operations on
  the machine level: [assembly](Assembly.md)


title: Magnetic_drum_memory
href: Magnetic_drum_memory.md
type: markdown
snippet:
  Like [Magnetic_drum_memory](Magnetic_drum_memory.md), magnetic core memory was
  faster and more reliable than [delay_line_memory](Delay_line_memory.md) and
  vacuum-tubes, and was also persistent. Thus it was used for volatile memory as
  well as storage.


title: delay line memory
href: Delay_line_memory.md
type: markdown
snippet:
  Seen as a improvement on Williams Tubes and
  [delay line memory](Delay_line_memory.md) but superseded by magnetic core memory
  later. It's concept lived on in harddisk drives which became the dominant form
  of secondary storage.


title: global process object
href: Process_object.md
type: markdown
snippet:
  To determine the current environment we can use the variable
  **`process.env.NODE_ENV`** from the
  [global process object](Process_object.md).
  This works universally regardless of the kind of Node app we are building.


title: environment variable
href: Environmental_and_shell_variables.md
type: markdown
snippet:
  `NODE_ENV` is a bash
  [environment variable](Environmental_and_shell_variables.md)
  like any other. So we can set it in the normal way:


title: Config
href: node-config
type: markdown
snippet:
  We use the third-party [Config](node-config)
  package to manage different configurations based on the environment.


title: environmental variables
href: Environmental_and_shell_variables.md
type: markdown
snippet:
  We can do so securely by utilising
  [environmental variables](Environmental_and_shell_variables.md)
  alongside the config pacakage.


title: React_useEffect
href: React_useEffect.md
type: markdown
snippet:
  Note that the syntax is similar to [React_useEffect](React_useEffect.md): there is a
  dependency array. The effect is the same: the function contained within
  `useCallback` will only re-rendered if one of these dependencies changes.
  However (see next section) the function will run in its memoized form on every
  click.


title: logarithm
href: Logarithms.md
type: markdown
snippet:
  We need to reverse this formula to find out how many bits we need to represent a
  given number of addresses. We can do this with a [logarithm](Logarithms.md).


title: hexadecimal numbers
href: Hexadecimal_number_system.md
type: markdown
snippet:
  This is hard to parse so we can instead use
  [hexadecimal numbers](Hexadecimal_number_system.md) to represent the addresses:


title: binary encoding
href: Binary_encoding.md
type: markdown
snippet:
  By itself, the the data is meaningless but we know from
  [binary encoding](Binary_encoding.md) that the binary data will correspond to
  some meaningful data, such as a character or a colour, depending on the encoding
  scheme used. The above table could correspond to the characters for 'A', 'B' and
  'C' in the ASCII encoding scheme:


title: ports
href: Ports_in_NodeJS.md
type: markdown
snippet:
  We can control which middleware we run via the Node envrionment variables:
  `process.env` (see for instance [ports](Ports_in_NodeJS.md)).


title: add fractions with a common denominator
href: Add_Subtract_Fractions.md#adding-subracting-fractions-with-common-denominators
type: markdown
snippet:
  But we know that when we
  [add fractions with a common denominator](Add_Subtract_Fractions.md#adding-subracting-fractions-with-common-denominators),
  we only add the numerators, not the denominators. Thus the calculation would
  actually be:


title: using factorization
href: Multiplying_fractions.md#prime-factorisation-in-place
type: markdown
snippet:
  Then carry out the multiplication
     [using factorization](Multiplying_fractions.md#prime-factorisation-in-place):


title: invert and multiply
href: Dividing_fractions.md#formal-specification-of-how-to-divide-fractions'
type: markdown
snippet:
  Again we convert the mixed fraction into an improper fraction and then follow
  the requisite rule, in the case of division this is to
  [invert and multiply](Dividing_fractions.md#formal-specification-of-how-to-divide-fractions').


title: module object
href: Modules_in_NodeJS.md#structure-of-a-module
type: markdown
snippet:
  Note that one of these parameters is the
  [module object](Modules_in_NodeJS.md#structure-of-a-module).


title: tables
href: Relational_database_architecture.md#table
type: markdown
snippet:
  Although Mongo is not a relational database it has a structure that we can
  understand in relation to that paradigm. A **database** is obviously the overall
  structure. It comprises **collections** which are organised sets of data that
  are analagous to [tables](Relational_database_architecture.md#table)
  in RDBs. Within each collection are a series of **documents** which we can think
  of as being equivalent to [rows](Relational_database_architecture.md)
  in RDB table: units that comprise the collection.


title: ps
href: Processes.md
type: markdown
snippet:
  We can use [ps](Processes.md) to list the
  currently running processes but it does not provide much information about the
  resource metrics or how the process changes over time. We can use `top` to get
  more information.


title: virtual memory
href: Virtual_memory_and_the_MMU_in_Linux.md
type: markdown
snippet:
  The total amount of
      [virtual memory](Virtual_memory_and_the_MMU_in_Linux.md) used by
      the process including: program code, data, shared libraries, pages that have
      been swapped, pages that have been mapped but not used.


title: buffer
href: Role_of_memory_in_computation.md#relation-between-cache-and-buffers
type: markdown
snippet:
  Total kbs currently in
        [buffer](Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
        and not written


title: cache
href: Role_of_memory_in_computation.md#relation-between-cache-and-buffers
type: markdown
snippet:
  Total amount of virtual memory in the
        [cache](Role_of_memory_in_computation.md#relation-between-cache-and-buffers)


title: swapped
href: Swap_space.md
type: markdown
snippet:
  Distinguishes amount of memory
      [swapped](Swap_space.md) in (`si`) to memory and
      swapped out (`so`) to disk


title: kernel
href: The_kernel.md
type: markdown
snippet:
  A system call is when a process requests a service from the
  [kernel](The_kernel.md), for instance an I/O operation to
  memory. We can trace these system calls with `strace`.


title: MMU
href: Virtual_memory_and_the_MMU_in_Linux.md
type: markdown
snippet:
  We know that processes primarily interact with virtual memory in the form of
  pages which are then translated to physical blocks by the kernel via the
  [MMU](Virtual_memory_and_the_MMU_in_Linux.md). There are several tools
  which provide windows onto this process.


title: buffers and caches
href: Role_of_memory_in_computation.md#relation-between-cache-and-buffers
type: markdown
snippet:
  `free` displays the total amount of free and¬used physical and swap memory in
  the system, as well as the
  [buffers and caches](Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
  used by the kernel.


title: CPU
href: CPU_architecture.md
type: markdown
snippet:
  The motherboard is the foundation of a computer. It allocates power and allows
  communication to and between the
  [CPU](CPU_architecture.md),
  [RAM](Memory.md),
  [harddisk](What_are_disks.md) and all other hardware
  components.


title: reducing fractions
href: Reducing_fractions.md
type: markdown
snippet:
  It would be laborious to reduce such a large product using factor trees or the
  repeated application of divisors, as defined in
  [reducing fractions](Reducing_fractions.md). We can use a more efficient
  method. This method can be applied at the point at which we conduct the
  multiplication rather than afterwards once we have the product. We express the
  the initial multiplicands as prime factors:


title: query constants
href: Apollo_Client.md#query-constants
type: markdown
snippet:
  As with queries and
  [query constants](Apollo_Client.md#query-constants) we
  wrap our mutation in a `gql` template string:


title: link
href: Link_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  They are the physical interface between the computer and the network
  [link](./Link_Layer_of_Internet_Protocol.md), e.g. WiFi or ethernet.


title: motherboard
href: Motherboard.md
type: markdown
snippet:
  They can be internal and built into the [motherboard](./Motherboard.md) or
  external as in the case of USB adaptors.


title: MAC address
href: MAC_addresses.md
type: markdown
snippet:
  Each network card has a unique [MAC address](./MAC_addresses.md) to identify the
  device on the network.


title: internet_protocol_suite
href: Internet_fundamentals.md
type: markdown
snippet:
  A prime example of a layered network stack is the
  [internet_protocol_suite](Internet_fundamentals.md).


title: ways around this
href: https://thom4.net/2014/self-contained-node-scripts/
type: markdown
snippet:
  If you use any module not in the Node core, you will need to have this installed
  globally for it to work. (There are
  [ways around this](https://thom4.net/2014/self-contained-node-scripts/) for Node
  scripts you publish but for personal scripts this doesn't matter.)


title: build context
href: Creating_a_Docker_image.md#creating-a-docker-image
type: markdown
snippet:
  Each of the files listed below would be saved to the same source directory which
  would then form the basis of the
  [build context](Creating_a_Docker_image.md#creating-a-docker-image).


title: process.env
href: Managing_environments_in_NodeJS.md
type: markdown
snippet:
  In the example, the database connection information in the Node source is coming
  from the
  [`process.env`](Managing_environments_in_NodeJS.md)
  object, which itself is sourcing the values `MYSQL_HOST`, `MYSQL_PASSWORD` etc
  from the Docker compose file. Therefore these values are hardcoded there.


title: type-guarding
href: Type_guarding_and_narrowing.md
type: markdown
snippet:
  One way to get around it is to use better
  [type-guarding](Type_guarding_and_narrowing.md) and conditionality and to
  cover cases where the value may be undefined.


title: instruction_set_architecture
href: Instruction_set_architectures.md
type: markdown
snippet:
  Windows has its own API called _The Windows API_. The original version was
  16-bit called _Win16_, then when it moved to 32-bits it became _Win32_. When it
  moved to an x86 [instruction_set_architecture](Instruction_set_architectures.md)
  it became _Win64_. Starting with Windows 10, it introduced the _Universal
  Windows Platform_ which aims to make app development consistent accross
  different devices that run Windows.


title: semantic versioning
href: Semantic_versioning.md
type: markdown
snippet:
  `npm update` only updates from _current_ to _wanted_. In other words it only
  updates in accordance with your caret and tilde rules applied to
  [semantic versioning](Semantic_versioning.md).


title: torrenting
href: Torrenting.md
type: markdown
snippet:
  A practical example of this is [torrenting](Torrenting.md) - an applicaton of
  P2P technology to file sharing.


title: event listeners
href: Events module.md#event-emitters
type: markdown
snippet:
  While we may not know the specific port, whatever it is, it will be accessible
  via the `PORT` environment variable. So we can use this when writing our
  [event listeners](Events%20module.md#event-emitters):


title: AWS API Gateway
href: AWS_API_Gateway.md
type: markdown
snippet:
  We will do this using [AWS API Gateway](AWS_API_Gateway.md). We
  select "Add trigger" from the dashboard view and input basic settings:


title: factors
href: Factors and divisors.md
type: markdown
snippet:
  For any whole number $n$ where $n \neq 1$, $n$ is prime if and only if its
  > sole [factors](Factors%20and%20divisors.md) are $1$ and $n$


title: any
href: Any.md
type: markdown
snippet:
  `Object` is a valid type declaration in TS but it is not particularly helpful
  since it becomes similar to using [any](Any.md) given that most primitive
  types in JavaScripts prototypically inherit from an Object.


title: custom types
href: Custom_types_in_TypeScript.md
type: markdown
snippet:
  Generally, when you use objects in TypeScript you type them as
  [custom types](Custom_types_in_TypeScript.md).


title: format specifier
href: zk/format-specifiers-in-c.md
type: markdown
snippet:
  The `%d` is an example of a [format specifier](./zk/format-specifiers-in-c.md).
  It is the decimal integer format specifier.


title: event listeners
href: events.md
type: markdown
snippet:
  Typically we want to write and read data that the user provides. To do this we
  need to wait on that event. So we use Node's asynchonous
  [event listeners](events.md). We wait
  on the `data` event:


title: 8-bits long
href: Binary_units_of_measurement.md
type: markdown
snippet:
  When Python runs in this implementation, code written in C converts it to
  bytecode (so-called because each instruction is
  [8-bits long](Binary_units_of_measurement.md)). This is a
  lower-level transliteration of Python is not meant to be understood by the CPU
  (since it is not binary) but rather to be run in the Python virtual machine
  which is equipped to understand bytecode. The Python Virtual Machine is
  therefore also known as "bytecode interpreter" or the CPython VM. The VM then
  converts bytecode into machine-executable code.


title: model
href: Create_collections_and_documents_with_Mongoose.md#models
type: markdown
snippet:
  Now we will query the collection. This capability is provided via the Mongoose
  schema class we used to create the `Course`
  [model](Create_collections_and_documents_with_Mongoose.md#models).
  We have the following methods available to use from the schema:


title: HTTP request types
href: HTTP_request_types.md
type: markdown
snippet:
  A basic example of a REST API would be a series of methods corresponding to the
  main [HTTP request types](HTTP_request_types.md).


title: React_useEffect
href: React_useEffect.md#cleanup-functions
type: markdown
snippet:
  As the warning suggests, this can be resolved using the cleanup parameter within
  [React_useEffect](React_useEffect.md#cleanup-functions).


title: Application state management
href: Application_state_management_with_React_hooks.md
type: markdown
snippet:
  In the examples above we have only been consuming state that is owned by the
  provider however in most scenarios you will also want to update the state from a
  consumer. This is best achieved by combining `useContext` with a reducer and is
  detailed in [Application state management](Application_state_management_with_React_hooks.md).


title: lifecyle methods
href: Lifecycle_methods.md
type: markdown
snippet:
  `useEffect` enshrines but also simplifies the
  [lifecyle methods](Lifecycle_methods.md) that are used with
  class-based React components.


title: lifecycle methods
href: Lifecycle_methods.md
type: markdown
snippet:
  The syntax of the `useEffect` hook also allows you to handle cleanup: something
  you want to do when the component unmounts (another example of how this hook
  recasts the traditional [lifecycle methods](Lifecycle_methods.md))
  . In addition to running on unmount, the cleanup function will run before the
  effect runs again (i.e. when it runs in response to a change in one of the
  elements of the dependency araray). This is chiefly used to prevent
  [memory leaks](Memory_leaks.md) and the
  ['update on unmounted component error'](React_errors.md#state-update-on-unmounted-component).


title: split the contents into an array
href: Split_into_array_in_Bash.md
type: markdown
snippet:
  `read` will parse line by line using a space (`\n`) as the default delimiter.
  You can use IFS to parse by other characters and/or
  [split the contents into an array](Split_into_array_in_Bash.md).


title: find
href: Find_Bash_command.md
type: markdown
snippet:
  Here we use [find](Find_Bash_command.md) to collate the files in
  the current directory and then pipe them to read.


title: file descriptors
href: File_descriptors_and_redirection.md
type: markdown
snippet:
  The `2>&1` argument is the content: any errors that the program may generate and
  try to show in stout. Notice we are using the
  [file descriptors](File_descriptors_and_redirection.md)
  `1` and `2`.


title: file descriptors
href: File_descriptors.md
type: markdown
snippet:
  It is common practice to combine redirection with the
  [file descriptors](File_descriptors.md) to redirect
  the output of `stdout` and `stderr`. A common case is to
  [redirect error output to `/dev/null`](Redirect_to_dev_null.md).


title: greatest common divisor
href: Factors and divisors.md#greatest-common-divisor
type: markdown
snippet:
  A fraction is said to be _reduced to its lowest terms_ if the
  > [greatest common divisor](Factors%20and%20divisors.md#greatest-common-divisor)
  > of the numerator and the denominator is $1$.


title: equivalent
href: Equivalent fractions.md
type: markdown
snippet:
  Whenever we reduce a fraction, the resultant fraction will always be
  > [equivalent](Equivalent%20fractions.md) to the fraction we started with.


title: highest common divisor
href: Factors and divisors.md#greatest-common-divisor
type: markdown
snippet:
  In the previous example the reduction took two steps: first we divided by two
  and then we divided by three. There is a more efficient way: find the
  [highest common divisor](Factors%20and%20divisors.md#greatest-common-divisor) of
  the numerator and denominator and then use this as the basis for the reduction.
  With this method, the reduction can be completed in a single step.


title: factors
href: Factors and divisors.md#factors
type: markdown
snippet:
  Note how our earlier two divisors 2 and 3 are
  [factors](Factors%20and%20divisors.md#factors) of 6, showing the consistency
  between the two methods.


title: interchangeability of factors and divisors
href: Factors and divisors.md
type: markdown
snippet:
  The two methods above are not very systematic and are quite heuristic. The third
  approach is more systematic and relies on the
  [interchangeability of factors and divisors](Factors%20and%20divisors.md).


title: factor
href: Factors and divisors.md#factors
type: markdown
snippet:
  Instead of thinking asking what is the greatest common divisor of 18 and 24 we
  could ask: which single number can we multiply by to get 18 and 24? Obviously
  both numbers are in the six times table. This is therefore to say that 6 is a
  [factor](Factors%20and%20divisors.md#factors) of both: we can multiply some
  number by 6 to arrive at both 18 and 24. The numbers are 3 and 4 respectively:


title: prime factorization
href: Prime factorization.md
type: markdown
snippet:
  A better method is to utilise [prime factorization](Prime%20factorization.md)
  combined with the canceling technique.


title: fraction with unlike terms
href: Handling negative fractions.md#fractions-with-unlike-terms
type: markdown
snippet:
  This fraction is an instance of a
    [fraction with unlike terms](Handling%20negative%20fractions.md#fractions-with-unlike-terms).


title: fraction with like terms
href: Handling negative fractions.md#fractions-with-like-terms
type: markdown
snippet:
  This fraction is an instance of a
    [fraction with like terms](Handling%20negative%20fractions.md#fractions-with-like-terms).


title: Registers
href: CPU_architecture.md#Registers
type: markdown
snippet:
  [Registers](./CPU_architecture.md#Registers) are a form of memory that are
  positioned on the same chip as the CPU. They are very fast but can only store a
  small amount of data. They are used to store the results of calculations and the
  addresses of the next instructions to be processed.


title: DRAM to fast SRAM
href: DRAM_and_SRAM_memory.md
type: markdown
snippet:
  Cache controllers use complex algorithms to determine what should go into the
  cache to facilitate the best performance, but generally they work on the
  principle that what has been previously used by the CPU will be requested again
  soon. If the CPU has just asked for an instruction at memory location 555 it's
  very likely that it will next ask for the one at 556, and after that the one at
  557 and so on. The cache's controller circuits therefore go ahead and fetch
  these from slow [DRAM to fast SRAM](./DRAM_and_SRAM_memory.md).


title: electro-mechanical era of computing
href: The_History_of_Computing_Swade.md
type: markdown
snippet:
  During the
  [electro-mechanical era of computing](The_History_of_Computing_Swade.md) they
  were used as precursors to vacuum tubes (and later, transistors) to implement
  logic gates. While they were superseded in this domain, they are still used in
  industrial control systems and automobiles.


title: amp
href: Current.md#formal-expression
type: markdown
snippet:
  One ohm is the resistance of a circuit or circuit element that permits a
  > steady current flow of one [amp](Current.md#formal-expression) (one
  > coulomb/second) when one [volt](Voltage.md#voltage) is applied to the circuit.


title: AWS Lambda handler function
href: Lambda_handler_function.md
type: markdown
snippet:
  Let's walk through the above example making reference to the general structure
  of the
  [AWS Lambda handler function](Lambda_handler_function.md):


title: system bus
href: Bus.md
type: markdown
snippet:
  The instruction at the first address is sent to the CPU, travelling accross
     the data bus part of the [system bus](Bus.md).


title: chipset
href: Chipset_and_controllers.md
type: markdown
snippet:
  The CPU processes this instruction and then sends a request accross the
     address bus part of the system bus for the next instruction to the memory
     controller within the [chipset](Chipset_and_controllers.md).


title: DRAM
href: Memory.md#dram
type: markdown
snippet:
  The chipset finds where this instruction is stored within the
     [DRAM](Memory.md#dram) and issues a request to have it read out and send to
     the CPU over the data bus.


title: ACID principle
href: ACID_principle.md
type: markdown
snippet:
  This is essential for carrying out operations across database tables and for
  creating and deleting database entires in accordance with the
  [ACID principle](ACID_principle.md). It is also a safeguard: it means
  you can always identify a record by itself and don't have to rely on generic
  queries to identify it.


title: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html
href: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html
type: markdown
snippet:
  See
  [https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html)


title: IAM user
href: zk/AWS_User_management_and_roles.md#iam
type: markdown
snippet:
  You require an access key for the given
  [IAM user](zk/AWS_User_management_and_roles.md#iam). You should create an IAM
  account specific to the project with bounded permissions.


title: IAM
href: zk/AWS_User_management_and_roles.md#iam
type: markdown
snippet:
  This information can be found in the Security Credentials section of the given
  [IAM](zk/AWS_User_management_and_roles.md#iam) user:


title: handler function
href: Lambda_handler_function.md
type: markdown
snippet:
  This details the location of the [handler function](/Lambda_handler_function.md)
  which is contained at the path `hello-world/app.js`:


title: S3
href: zk/AWS_S3.md
type: markdown
snippet:
  The packaging proces will first archive all of the project artefacts into a zip
  file and then upload that to [S3](zk/AWS_S3.md). A reference to this S3 entity
  is then provided to CloudFormation.


title: environmental and shell variables
href: Environmental-and-shell-variables-04d5ec7e8e2b486a93f002bf686e4bbb
type: markdown
snippet:
  The type of shell session that you are currently in affects the
  [environmental and shell variables](Environmental-and-shell-variables-04d5ec7e8e2b486a93f002bf686e4bbb)
  that you can access. This is because the order in which configuration files are
  read on initialisation differs depending on the type of shell.


title: operator inversion rules
href: Inversion of operators.md
type: markdown
snippet:
  When solving equations we frequently make use of the
  [ operator inversion rules](Inversion%20of%20operators.md) to find the
  solutions.


title: heap memory
href: Heap_memory
type: wiki-link
snippet:
  Along with [[Heap_memory|heap memory]] heap memory, programs make use of
    _stack memory_ during runtime.


title: stack data structure
href: Stacks
type: wiki-link
snippet:
  Similarly to the [[Stacks|stack data structure]], it works on the basis of LIFO:
  the last item put on the stack is the first item to be withdrawn.


title: register
href: CPU_architecture#registers
type: wiki-link
snippet:
  A **stack pointer** is used to manage the items in the stack. This value is
  stored in a [[CPU_architecture#registers|register]] and its value is the memory
  address of the item currently on the top of the stack. Note: _not_ the value
  itself, the _address_ of the value.


title: memory leaks
href: Memory_leaks
type: wiki-link
snippet:
  Local variable storage: storing the variables local to a function's scope and
     removing them once the function returns, avoiding
     [[Memory_leaks|memory leaks]]


title: Lambda
href: Lambda_programming_model.md
type: markdown
snippet:
  At the beginning you define a `StartAt` state which is the entrypoint of the
  state machine. This can be manually triggered, or more likely, triggered by
  another AWS service such as a
  [Lambda](Lambda_programming_model.md), an
  [API Gateway](AWS_API_Gateway.md) request or a messaging/queue
  event.


title: recursive
href: Recursion.md
type: markdown
snippet:
  Goal analysis is a [recursive](Recursion.md) strategy which
  proceeds by using a 'goal' proposition to guide the construction of intermediary
  derivations.


title: valid
href: Validity_and_entailment.md#validity
type: markdown
snippet:
  Assume that we want to show that an argument is
  [valid](Validity_and_entailment.md#validity). Then our
  ultimate goal is to derive the conclusion from the premises we are given. We
  first ask ourselves: _which propositions if we could derive them, would allow us
  to easily derive the conclusion_? (For example, these propositions might be two
  simple propositions that when combined with
  [Conjunction Introduction](Conjunction_Introduction.md) give us
  the conclusion.) Deriving these propositions then becomes the new intermediate
  goal.


title: Conjunction Introduction
href: Conditional_Introduction.md
type: markdown
snippet:
  First, we consider what is the easiest possible way of achieving the proposition
  $(L \lor A) \land D$. Clearly it is to separately derive each disjunct
  ($L \lor A$ and $D$) and then combine them with
  [Conjunction Introduction](Conditional_Introduction.md). This
  provides us with our first goal: to derive each of the separate conjuncts.


title: Conjunction Elimination
href: Conjunction Elimination.md
type: markdown
snippet:
  Let's start with $D$: where does it occur in the assumptions? It occurs in the
  compound $(\lnot N \rightarrow L) \land (D \leftrightarrow \lnot N)$, but only
  in the first conjunct. We can get this simply but applying
  [Conjunction Elimination](Conjunction%20Elimination.md).


title: Biconditional Elimination
href: Biconditional_Elimination.md
type: markdown
snippet:
  Now we just need to get $D$ from the proposition at line 3. This is easy since
  we already have access to the consequent of the biconditional at line 1.
  Therefore we can apply
  [Biconditional Elimination](Biconditional_Elimination.md)) at line
  3 to get $D$. We are now halfway there:


title: Conjunction Elimination
href: Conjunction_Elimination.md
type: markdown
snippet:
  Next we need to turn our attention to deriving $L \lor A$. How can we obtain $L$
  ? Well it is contained within the first conjunct of the assumption on line 2.
  Again, we can get this through the application of
  [Conjunction Elimination](Conjunction_Elimination.md). Now, how do
  we get $L$ from $(\lnot N \rightarrow L)$? Well, we already have the antecedent
  $\lnot N$ as an assumption on the first line, so we can use
  [Conditional Elimination](Conditional_Elimination.md) to derive
  $L$. These two steps give us:


title: Disjunction Introduction
href: Disjunction_Introduction.md
type: markdown
snippet:
  Now we need to get from $L$ to $L \lor A$. This is really straightforward
  because by using
  [Disjunction Introduction](Disjunction_Introduction.md)) we can
  get from any sentence to a disjunction. Finally, having assembled all the
  constituent parts of the conjunction that is the conclusion, we can combine them
  with [Conjunction Introduction](Conjunction_Introduction.md) as we
  had planned at the outset.


title: Conjunction Introduction
href: Conjunction_Introduction.md
type: markdown
snippet:
  The requirements here could easily mislead us. We see that the target
  proposition is a conjunction so we might think that the best strategy is to seek
  to derive each conjunct and then combine them via
  [Conjunction Introduction](Conjunction_Introduction.md)).


title: Biconditional Elimination
href: Biconditional_Elimination.md
type: markdown
snippet:
  Actually, if we look more closely, there is a better approach. The target
  proposition is contained in the first premise as the consequent to the
  biconditional ($\lnot L \leftrightarrow [X \land (\lnot S \lor B)]$). A better
  approach is therefore to seek to derive the antecedent ($\lnot L$) and then use
  [Biconditional Elimination](Biconditional_Elimination.md) to
  extract the target sentence which is the consequent.


title: theorems
href: Theorems_and_empty_sets.md#theorems-and-empty-sets
type: markdown
snippet:
  When we are proving
  [theorems](Theorems_and_empty_sets.md#theorems-and-empty-sets)
  we do not have a set of assumptions to work from when constructing the proof. We
  must derive the target sentence from the 'empty set' which is the target
  sentence itself. It is therefore like a process of reverse engineering.


title: Disjunction Elimination
href: Disjunction_Elimination.md
type: markdown
snippet:
  Our starting assumption is to a disjunction. Thus we can apply
    [Disjunction Elimination](Disjunction_Elimination.md) to show
    that our goal sentence $\lnot(A \land B)$ follows from each of the disjuncts
    ($\lnot A$ and $\lnot B$) in dedicated sub-proofs. If we can do this, we have
    the right to derive $\lnot (A \land B)$.


title: Disjunction Elimination
href: Disjunction_Elimination.md
type: markdown
snippet:
  Having done this, we can discharge the
    [Disjunction Elimination](Disjunction_Elimination.md) sub-proofs
    and derive $\lnot (A \land B)$ from $\lnot A \lor \lnot B$


title: Negation Elimination
href: Negation_Elimination.md
type: markdown
snippet:
  We will do this by assuming the negation of what we want to prove
    ($\lnot (\lnot A \lor \lnot B)$) and then apply
    [Negation Elimination](Negation_Elimination.md) to get
    $\lnot A \lor \lnot B$.


title: Negation Elimination
href: Negation_Elimination.md
type: markdown
snippet:
  This requires us to derive a contradiction. We get this on lines 23 and 24.
    This requires as previous steps that we have two sub-proofs that use
    [Negation Elimination](Negation_Elimination.md) to release $A$
    and $B$


title: list
href: Lists_in_Python.md
type: markdown
snippet:
  The `split()` function in Python is used to divide a string into multiple parts
  at the occurrence of a given separator. This function returns a
  [list](Lists_in_Python.md) of substrings.


title: kernel
href: The_kernel.md
type: markdown
snippet:
  To use an existing disk partition as a swap you can run the command
  `mkswap [device]` and then `swapon [device]` to register the space with the
  [kernel](The_kernel.md).


title: fstab
href: Filesystems.md#fstab
type: markdown
snippet:
  You will want the swap to be activated every time the OS boots so add the
  following line to the [fstab](Filesystems.md#fstab),
  where `/sda3` is used as the example partition:


title: atomic and molecular propositions
href: Atomic_and_molecular_propositions.md
type: markdown
snippet:
  These definitions provide a formal specification of the concepts of
  [atomic and molecular propositions](Atomic_and_molecular_propositions.md)
  introduced previously.


title: array
href: Lists_and_arrays_in_Bash.md
type: markdown
snippet:
  Note: this syntax can also be used to test if a given element exists in an
  > [array](Lists_and_arrays_in_Bash.md).


title: pip
href: Python_package_management.md
type: markdown
snippet:
  Pytest is the most popular testing library for Python. It is not included with
  the Python standard library so it must be installed with
  [pip](Python_package_management.md).
  While it does not include a declaration library, it is robust enough to handle
  most scenarios having a rich and expressive set of constructs and decorators
  that let you declare what your tests should do, under what conditions they
  should run, and how they should interact with the rest of your system.


title: memory management unit
href: Virtual_memory_and_the_MMU_in_Linux.md#the-memory-management-unit-mmu
type: markdown
snippet:
  Modern CPUs include a
  > [memory management unit](Virtual_memory_and_the_MMU_in_Linux.md#the-memory-management-unit-mmu)
  > which provides the kernel with **virtual** memory. In this scenario, memory
  > isn't directly accessed by the process instead it works on the assumption that
  > is has access to the entire memory of the machine and this is then translated
  > into a map that is applied to the real memory and managed by the kernel.


title: clock pulses
href: Clock_signals.md
type: markdown
snippet:
  The circuit will have three memory components, each representing one bit of the
  3-bit number. When the
  [clock pulses](Clock_signals.md), the
  3-bit number increments by one. We need to synchronise the operation with a
  clock because each bit by itself is meaningless, it only gains meaning by the
  relation it sustains to the other two bits hence it must be kept in sync with
  them.


title: T flip-flop
href: Flip_flops.md#t-flip-flops
type: markdown
snippet:
  This means that to construct a circuit that displays this behaviour we just have
  to use a
  [T flip-flop](Flip_flops.md#t-flip-flops)
  since the only state change we need is a single bit toggle three times that
  retains its value.


title: peer_to_peer_networking
href: Peer_to_peer_network.md
type: markdown
snippet:
  Torrenting is a specific application of
  [peer_to_peer_networking](Peer_to_peer_network.md) applied to file-sharing.


title: protocols
href: Network_protocols.md
type: markdown
snippet:
  _BitTorrent_ is the communications [protocols](Network_protocols.md) for P2P
    file sharing. It was also a client software developed by the company
    BitTorrent Inc.


title: voltage
href: Voltage.md
type: markdown
snippet:
  Transistors are an electrical component that is capable of controlling the flow
  of current in the manner of a switch where the 'off' and 'on' states are
  represented by [voltage](Voltage.md) values within set parameters.


title: AND
href: Logic_gates.md#and-gate
type: markdown
snippet:
  For example to create an [AND](Logic_gates.md#and-gate) gate we would have two
  voltage inputs going into two transistors that are connected in sequence. The
  two transistors create a continuous line going from the collector of one to the
  emitter of the other. If either voltage input is low then the voltage of the
  combined line is low (equivalent to the circuit being broken) and there is no
  current flowing.


title: logically determinant
href: Logical_indeterminacy.md
type: markdown
snippet:
  We know that
  [logically determinant](Logical_indeterminacy.md)
  propositions express a truth value. When simple propositions are joined with a
  connective to make a compound proposition they also have a truth value. This is
  determined by the nature of the connective and the truth value of the
  constituent propositions. We therefore call connectives of this nature truth
  _functional_ connectives since the **truth value of the compound is a function
  of the truth values of its components**.


title: immediate sentential components
href: Syntax of sentential logic.md
type: markdown
snippet:
  The core truth-tables tell us how to determine the truth-value of a molecular
  > sentence given the truth-values of its
  > [immediate sentential components](Syntax%20of%20sentential%20logic.md). And if
  > the immediate sentential components of a molecular sentence are also
  > molecular, we can use the information in the characteristic truth-tables to
  > determine how the truth-value of each immediate component depends n the
  > truth-values of _its_ components and so on.


title: truth-tables
href: Truth-tables.md
type: markdown
snippet:
  Like [truth-tables](Truth-tables.md), truth-trees are a means of graphically
  representing the logical relationships that may obtain between propositions.
  Truth-trees and truth-tables complement each other and which method you choose
  depends on which logical property you are seeking to derive.


title: consistent
href: Consistency.md
type: markdown
snippet:
  Recall that a set of propositions is logically or truth-functionally
  [consistent](Consistency.md) just if there is at least one assignment of truth
  conditions which results in all members of the set being true. To identify
  consistency for a set of three propositions via the truth table approach we
  would need to construct a truth table with $2^3$ (8) rows. Assume that this set
  is consistent on one partial assignment only. This means that 87.5% of our rows
  are redundant, they are not required to prove the consistency of the set.
  However we can only know this and we can only be sure of consistency once we
  have gone through the process of generating an assignment for each row.


title: logical falsity
href: Logical truth and falsity.md#logical-falsity
type: markdown
snippet:
  When we wish to assess
  [logical falsity](Logical%20truth%20and%20falsity.md#logical-falsity) we are not
  focused on sets however, we are interested in a property of a sentence. However
  we can easily construe single sentences as unit sets: sets with a single member.
  With this in mind and the above accounts of consistency and logical falsity we
  are equipped to express logical falsity in terms of truth-trees with the
  following rule:


title: logically true
href: Logical truth and falsity.md#logical-truth
type: markdown
snippet:
  For a sentence $P$ to be
  [logically true](Logical%20truth%20and%20falsity.md#logical-truth), there must
  be no possible assignment in which $P$ is false. We express this informally by
  saying _it is not possible to consistently deny $P$._ We know that in terms of
  truth trees an inconsistent set is a closed tree therefore a unit set of ${ P }$
  is logically true if ${ \sim P }$ is a closed tree. This is to say: if the
  negation of $P$ is inconsistent.


title: Indeterminacy
href: Indeterminacy.md
type: markdown
snippet:
  [Indeterminacy](Indeterminacy.md) follows from the two definitions above; we do
  not require any additional apparatus. We recall that a sentence $P$ is logically
  indeterminate just if it is neither logically true or logically false. Thus the
  truth tree for an indeterminate sentence is straightforward:


title: logically equivalent
href: Logical equivalence.md
type: markdown
snippet:
  Recall that $P$ and $Q$ are [logically equivalent](Logical%20equivalence.md)
  just if there is no truth assignment on which one is true and the other is
  false. We know from the
  [material biconditional shorthand](Corresponding%20material%20and%20biconditional.md#corresponding-material-biconditional)
  that this state of affairs can be expressed as $P \equiv Q$ and that if this
  compound sentence is true on every assignment then both simple sentences are
  equivalent. But ‘true on every assignment’ is another way of saying _logically
  true_ since there is no possibility of a false assignment. We already know what
  logical truth looks like as a truth tree: it is a closed tree for the negation
  of the sentence being tested. Therefore, to test the logical equivalence of two
  sentences it is necessary to construct a truth tree for the negation of the
  sentences conjoined by the biconditional (i.e. $\sim (P \equiv Q)$ )and see if
  this results in a closed tree. If it does, the two sentences are logically
  equivalent.


title: entailment
href: Validity and entailment.md#entailment
type: markdown
snippet:
  Let’s remind ourselves of the meaning of truth-functional
  [entailment](Validity%20and%20entailment.md#entailment) and
  [validity](Validity%20and%20entailment.md#validity) and the relation between the
  two. $\Gamma$ $\vdash$ $P$ is true if and only if there is no truth-assignment
  in which every member of $\Gamma$ is true and $P$ is false. Entailment is
  closely related to validity; it is really just a matter of emphasis: we say that
  $\Gamma$ are the premises and $P$ is the conclusion and that this is a valid
  argument if there is no assignment in which every member of $\Gamma$ is true and
  $P$ is false.


title: binary encoding
href: Binary_encoding
type: wiki-link
snippet:
  Two's complement divides the available word length (see
  [[Binary_encoding|binary encoding]]) into two subsets: one for negative integrs
  and one for positive integers.


title: signed_and_unsigned_numbers
href: Signed_and_unsigned_numbers
type: wiki-link
snippet:
  [[Signed_and_unsigned_numbers|signed_and_unsigned_numbers]],
  [[Binary_addition|binary addition]], [[Signed_magnitude_representation]]


title: query
href: Querying_a_Mongo_collection.md
type: markdown
snippet:
  With this approach we first execute a
  [query](Querying_a_Mongo_collection.md) to retrieve the document we
  want to edit and then make the change. We use the `findById` method to identify
  the document by its UUID and then `set` to update specified properties on the
  document. The `set` method is one of many operators that can be used to update
  values. For example there is also built-in operators for increment, renaming,
  multiplying values.


title: middlewear
href: Middleware_in_NodeJS.md
type: markdown
snippet:
  Next we introduce GraphQL as a piece of Node.js
  [middlewear](Middleware_in_NodeJS.md), with the
  `app.use()` method.


title: original schema
href: Apollo_Server.md#example-schema
type: markdown
snippet:
  In order to demonstrate arguments we need to expand the
  [original schema](Apollo_Server.md#example-schema).


title: server-side process
href: Apollo_Server.md
type: markdown
snippet:
  Now we have to create a resolver for our new `track` query. We will quickly run
  through the [server-side process](Apollo_Server.md).


title: useQuery hook
href: Apollo_Client.md#usequery-hook
type: markdown
snippet:
  We can now write a proper query using the
  [useQuery hook](Apollo_Client.md#usequery-hook) from
  Apollo Client, with variables.


title: simple example
href: Apollo_Client.md#query-constants
type: markdown
snippet:
  Note that in contrast to the
  [simple example](Apollo_Client.md#query-constants)
  because we are using variables, we have to pass-in an additional options object
  with the query constant that specifies our variables.


title: Joi
href: Validation_in_NodeJS.md
type: markdown
snippet:
  What is the relationship between this Mongoose validation and the
  [Joi](Validation_in_NodeJS.md) validation that we
  use when validating API requests in Node/Express? They complement each other. We
  use Joi to validate the client request to the API. If this is valid, the process
  would then move onto the next stage which would be transforming the data from a
  REST request to a database request implemented through Mongoose, where a second
  layer of validation would appy. We would also have validation on the
  client-side.


title: processes
href: Processes.md
type: markdown
snippet:
  When an OS implements virtual memory, [processes](./Processes.md) in
  [user space](./User_Space.md) cannot directly read or write to the physical
  memory. Instead they execute memory operations against virtual memory and the
  [kernel](./The_kernel.md) translates these into the actual operations against
  the memory hardware.


title: memory addresses
href: Memory_addresses.md
type: markdown
snippet:
  Because the physical memory is abstracted, it can be the case that the physical
  [memory addresses](./Memory_addresses.md) are non-contiguous or even distributed
  accross different hardware components (such as the
  [cache](./Register_and_cache_memory.md) and [swap](./Swap_space.md)). Despite
  this, the memory addresses will appear contiguous in virtual memory. Each user
  space process is presented with the same range of available memory addresses and
  the same total capacity.


title: boot_process
href: Boot_process.md
type: markdown
snippet:
  During the [boot_process](Boot_process.md), it runs in physical memory mode
  however it rapidly creates a 1:1 mapping of physical to virtual memory for
  itself. This direct mapping allows the kernel to easily access any physical
  memory location as needed, whilst retaining the benefits of virtual memory.


title: current
href: Current.md
type: markdown
snippet:
  We noted in the discussion of [current](Current.md) that current flows when
  there is a difference of potential between two points with negatively charged
  atoms at one point and positively charged atoms at the other.


title: form of energy
href: Voltage_sources.md
type: markdown
snippet:
  Voltage is the application of this energy. Any
  [form of energy](Voltage_sources.md) that dislodges electrons from atoms can be
  used to produce current. Thus:


title: battery
href: Cells_and_batteries.md
type: markdown
snippet:
  Given that voltage is the force that generates current, it would be natural to
  think that voltage only exists when a voltage source (such as a
  [battery](Cells_and_batteries.md)) is connected to a circuit. This however is
  not the case. Even if a 9V battery isn't connected to anything it still has a
  difference of potential of 9-volts accross its terminals. Remember voltage is
  _potential energy_ not just the actualisation of that energy.


title: Ohm's Law
href: Ohms_Law.md
type: markdown
snippet:
  We can work out the voltage of the remaining voltage points by inverting
  [Ohm's Law](Ohms_Law.md): $V = I \times R$:


title: batteries
href: Cells_and_batteries.md
type: markdown
snippet:
  The chemical creation of current is the physics behind
  [batteries](Cells_and_batteries.md). Chemical current production produces
  currents on a smaller and less industrial scale than generators.


title: partitions
href: Partitions.md
type: markdown
snippet:
  A disk is divided up into [partitions](Partitions.md)
    which are subsections of the overall disk. The kernel presents each partition
    as a [block device](Devices.md) as it would with an entire
    disk.


title: user space
href: User_Space.md
type: markdown
snippet:
  The **filesystem** is a database of files and directories: this comprises the
    bulk of the partition and is what you interact with in
    [user space](User_Space.md) when reading and writing data.


title: CPU
href: CPU_architecture.md
type: markdown
snippet:
  When a [CPU](CPU_architecture.md) executes a program, it needs a place to store
  the program's **instructions** and **related data**. This is the role of memory.


title: RAM
href: DRAM_and_SRAM_memory.md
type: markdown
snippet:
  [RAM](./DRAM_and_SRAM_memory.md) memory is _volatile_ : the memory is only
  retained whilst the computer has a power supply and is wiped when the computer
  is rebooted. This contrasts with the memory of the harddisk which is
  non-volatile and is retained after a reboot.


title: multiplicands
href: Symbols-and-formal-conventions-80aeaf1872f94a0d97a2e8d07e3855bd
type: markdown
snippet:
  When **multiplying** whole numbers the placement of the
  [multiplicands](Symbols-and-formal-conventions-80aeaf1872f94a0d97a2e8d07e3855bd)
  does not affect the
  [product](Symbols-and-formal-conventions-80aeaf1872f94a0d97a2e8d07e3855bd).


title: expansion
href: Expansions_and_substitutions.md
type: markdown
snippet:
  Note: we do not use a dollar-sign when referring to variables within
  > arithmetic evaluation, there is no need. If we do, we get an error. This is
  > because we are using an
  > [expansion](Expansions_and_substitutions.md),
  > therefore the variables are already being interpreted as variables.


title: event queue
href: Event_loop.md
type: markdown
snippet:
  Every method associated with `fs` has a _blocking_ and _asynchronous_
  implementation. The former obviously blocks the
  [event queue](Event_loop.md), the
  latter does not.


title: event emitter
href: events.md
type: markdown
snippet:
  An HTTP server is another instance of an
  [event emitter](events.md)). It
  therefore has all the same methods as the `EventEmitter` class: `on`, `emit`,
  `addListener` etc. This demonstrates again how much of Node's core functionality
  is based on event emitters.


title: processor core
href: CPU_architecture.md
type: markdown
snippet:
  Each [processor core](CPU_architecture.md) can only run one thread at a time so
  the number of cores that a device's CPU has deterimines how many threads can run
  at once. In practice, then, the CPU shuffles between multiple threads in
  [clock segments](Clock_signals.md). This is known as scheduling and is managed
  by the process that the thread belongs to.


title: Paul Baran's work on distributed networks
href: 385af4b4_baran_distributed_networks.md
type: markdown
snippet:
  Ideas that originated from this concern _did_ influence the project (chiefly
  [Paul Baran's work on distributed networks](385af4b4_baran_distributed_networks.md)
  at RAND), but this was not the concern of the ARPANET.


title: mainframe
href: Mainframe_computers.md
type: markdown
snippet:
  (Presumably, the services would be hosted on a providers'
  [mainframe](Mainframe_computers.md) or mini-computer, which the consumer would
  access through something like time-sharing?)


title: network
href: Network_fundamentals.md
type: markdown
snippet:
  These responsibilities required the IMP to "know" the location and addresses of
  other IMPs and hosts on the [network](Network_fundamentals.md) and their
  proximity to them.


title: CPU Architecture
href: CPU_architecture.md#arithmetic-logic-unit
type: markdown
snippet:
  Now the command will be executed. The operand is copied to the Memory Address
  Register and then passed to the Memory Data Register and the command is carried
  out by the ALU. The activities of ALU are covered in
  [CPU Architecture](CPU_architecture.md#arithmetic-logic-unit) and the notes on
  [Logic Gates](Logic_gates.md).


title: registers
href: CPU_architecture.md#registers
type: markdown
snippet:
  If the instruction is iterative (e.g. adding two numbers and then multiplying
    by another number), the instruction will tell the CPU to store the interim
    first value in the CPU's [registers](CPU_architecture.md#registers). As these
    are part of the CPU, the data can be retrieved more readily. If the value is
    not expected to be used again immediately, it goes to the DRAM or harddisk.


title: subscription-based
href: cfbef1c4_web_precursors.md
type: markdown
snippet:
  Later, these became commercial and
  [subscription-based](cfbef1c4_web_precursors.md). A plethora of ..._NETS_ grew
  up (NSFNET, USENET, CSNET, TELENET etc.), all based on #packet-switching, the
  ARPANET nodes as the backbone and [TCP/IP](Link_Layer_of_Internet_Protocol.md)
  host communication.


title: Paul Baran
href: 385af4b4_Baran_distributed_networks.md
type: markdown
snippet:
  [Paul Baran](385af4b4_Baran_distributed_networks.md) for his work at RAND on
    distributed networks as an alternative to the extant
    centralised/de-centralised phone networks.


title: Transmission Control Protocol/Internet Protocol
href: Internet_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  This required a new protocol because the Network Control Protocol was only
  designed to work _within_ the ARPANET with its IMPs. Unlike the IMPs, the
  gateways would not be responsible for reconstituting packets or ensuring
  reliability, this would be shifted to the hosts. The protocol was the
  [Transmission Control Protocol/Internet Protocol](Internet_Layer_of_Internet_Protocol.md).
  TCP would be responsible for packet assembly and disassembly and IP for routing.


title: filesystem
href: Filesystems.md
type: markdown
snippet:
  You see the GRUB default menu when you first start a Linux machine. It will
  offer you various options for loading your installed OS or other OSs. GRUB is a
  [filesystem](./Filesystems.md) like the main disk. If you press `e` in this
  screen you can view and edit specific boot parameters. Pressing `c` gives you
  access to the GRUB command line interface. This allows you to interact with GRUB
  in the same way as you would with any other filesystem, allowing for advanced
  configuration.


title: process id
href: Processes.md#processes-ps
type: markdown
snippet:
  The kernel starts a program called **init**. It has a
     [process id](Processes.md#processes-ps) of 1. This is the point at which
     [user space](User_Space.md) starts.


title: journal
href: journald.md
type: markdown
snippet:
  Linux keeps a log of the boot process as part of the [journal](./journald.md)
  log of everything that happens on disk. We can use the command `journalct -k` to
  view the diagnostics generated during the boot. Here is a selection:


title: Routing
href: Routing.md
type: markdown
snippet:
  If you are using React Router `App` becomes the index for the different page
    components. See [Routing](Routing.md) for more detail.


title: von Neumann architecture
href: CPU_architecture.md
type: markdown
snippet:
  It more resembled modern computers in that Babbage used concepts that would
  later translate into the [von Neumann architecture](CPU_architecture.md) There
  was a "mill" (CPU), "store" (memory) and input/output mechanisms. It also had a
  concept of looping and conditional branching.


title: von Neumann architecture
href: CPU_architecture.md
type: markdown
snippet:
  An experimental computer intended to create the
    [von Neumann architecture](CPU_architecture.md) using
    [Williams_Tube_RAM](Williams_Tube_RAM.md)


title: delay line memory
href: Delay_line_memory.md
type: markdown
snippet:
  It used vacuum-tubes for the arithmetical operations in the ALU and mercury
    [delay line memory](Delay_line_memory.md) for the RAM.


title: Turing_machine
href: Turing_machines.md
type: markdown
snippet:
  Technical design provided by Alan Turing working at the Mathematics Division
    of the National Physical Laboratory. The product of Turing's theoretical work
    in "On Computable Numbers" where he proposes the concept of a
    [Turing_machine](Turing_machines.md) and based on his experience with early
    single-purpose computing devices at Bletchley.


title: magnetic tape
href: Magnetic_tape.md
type: markdown
snippet:
  IBM's first electronic computer. It directly competed with the UNIVAC for
  government contracts. It followed the prevailing approach of vaccuum tubes for
  logic and had a variety of storage methods: Williams tubes,
  [magnetic tape](Magnetic_tape.md) , and magentic drums.


title: magnetic_core_memory
href: Magnetic_core_memory.md
type: markdown
snippet:
  Two devices that leveraged the new technology of
  [magnetic_core_memory](Magnetic_core_memory.md) where the Whirlwind and SAGE
  computers. The ENIAC was also updated to use magnetic cores.


title: application layer
href: Application_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  It became the best of the early browsers (a group that included ViolaWWW and
  Erwise) with the notable advantage of being able to embed graphics alongside
  text (instead of inside a separate window). It also supported multiple
  [application layer](Application_Layer_of_Internet_Protocol.md) protocols - FTP,
  the Network News Transfer Protocol, Gopher - not just HTTP.


title: Mosaic's
href: c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md
type: markdown
snippet:
  This function of a gateway to the overwhelming content of the web would be taken
  up first by browsers
  ([Mosaic's](c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md) landing page would
  list websites for specific sources of information and user tasks and links to
  other directories) and then of course search engines which would allow users to
  search for what they needed against an index (usually a subset) of the Web's
  total content. (Interestingly in this regard, AOL would eventually buy
  Netscape.)


title: distributed network
href: 385af4b4_Baran_distributed_networks.md
type: markdown
snippet:
  Usenet comprised a [distributed network](385af4b4_Baran_distributed_networks.md)
  of dedicated servers that exchanged messages over the **Network News Transfer
  Protocol** (NNTP).


title: TCP/IP
href: Transport_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  Usenet developed separately and in parallel with the Internet. Originally it did
  not operate over the Internet: servers would connect to each other over phone
  lines using the Unix-to-Unix Copy Protocol. In the late 1980s when the Internet
  became more widespread and not just limited to DARPA-adjacent universities,
  Usenet transitioned to running over
  [TCP/IP](Transport_Layer_of_Internet_Protocol.md) networks.


title: BitTorrent's
href: Torrenting.md
type: markdown
snippet:
  [BitTorrent's](Torrenting.md) distributed file-sharing model has similarities
    to how binary files were distributed across Usenet servers


title: copying functions
href: Functions_in_Python.md
type: markdown
snippet:
  The same principle that applies to [copying functions](Functions_in_Python.md)
  applies to copying objects created through classes: redeclaration results in a
  duplicate entity. Thus changes to the duplicate will affect the original.


title: AWS credentials
href: zk/AWS_CLI.md
type: markdown
snippet:
  Terraform will default to the currently active AWS user providing you have your
  [AWS credentials](/zk/AWS_CLI.md) set-up.


title: passing arguments to scripts
href: Passing_arguments_to_Bash_scripts.md
type: markdown
snippet:
  We can access all the arguments passed to a function using the `$@` syntax we
  encountered before when
  [passing arguments to scripts](Passing_arguments_to_Bash_scripts.md). (Here a
  function is a kind of script in miniature so the process is the same.)


title: $PATH
href: The_PATH.md
type: markdown
snippet:
  When we run a program like `cd` or `npm` we don’t have to type `./cd.sh` or
  `./npm.sh`. This is because a reference to the program file is already in our
  [`$PATH`](The_PATH.md).


title: Julia Evans
href: https://jvns.ca/blog/2024/11/18/how-to-import-a-javascript-library/
type: markdown
snippet:
  Great account by
  [Julia Evans](https://jvns.ca/blog/2024/11/18/how-to-import-a-javascript-library/).


title: queue
href: Queue.md
type: markdown
snippet:
  As the name indicates, its operating mode is that of a [queue](Queue.md) data
  structure offering first-in, first-out and other queue implementations.


title: API Gateway
href: API_Gateway.md
type: markdown
snippet:
  A request is made to an [API Gateway](API_Gateway.md) endpoint with a body. The
  body is then parsed and inserted into a database.


title: CloudWatch
href: AWS_CloudWatch.md
type: markdown
snippet:
  If the DLQ reaches a certain threshold this can trigger additional handling such
  as raising an Alert in [CloudWatch](./AWS_CloudWatch.md) or other monitoring
  tool.


title: DNS
href: Transport_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  comprises the [DNS](Transport_Layer_of_Internet_Protocol.md) hostname of the
      server containing the resource. This could also be an
      [IP address](IP_addresses.md) and could also include a port number


title: list
href: Lists_in_Python.md
type: markdown
snippet:
  A `SELECT` operation returns a [list](Lists_in_Python.md) of
  [tuples](Tuples_in_Python.md) where each entry in the tuple is a returned field.


title: exception
href: Error_handling_in_Python.md
type: markdown
snippet:
  Will error if the input string is not properly formatted JSON. This will be
  `json.JSONDecodeError`, a subclass of the `ValueError`
  [exception](./Error_handling_in_Python.md)


title: Recording and playback of sound
href: Recording_and_playback_of_sound.md
type: markdown
snippet:
  To record sound, we convert the change in air pressure into an electrical signal
  by means of a microphone. Effectively, the same natural waveform is converted
  from one medium (the vibration of air molecules) into another medium (electrical
  charge in a field) whilst retaining the same morphology. See
  [Recording and playback of sound](Recording_and_playback_of_sound.md).


title: modem-based
href: cfbef1c4_web_precursors.md
type: markdown
snippet:
  AOL in fact started this even before there was a Web, pioneering the concept of
  a web portal, with their [modem-based](cfbef1c4_web_precursors.md) private-BBS
  business model. This provided access to a circumscribed subset of the Internet
  at a time when accessing information was opaque and confusing to the average
  non-technical user. The advent of the web first threatened and then basically
  obviated this model, when access to information via browsers and HTTP servers
  made the process easier and more democratized. Hence why AOL then tellingly
  pivoted to the browser and search-engine market (purchasing
  [Netscape](c301a0b3-1d8_Mosaic_Netscape_and_Browser_Wars.md) in 1999), the next
  available mechanism of enclosure.


title: Internet Protocol
href: Internet_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  IP addresses come in two formats and bit-lengths depending on which version of
  the [Internet Protocol](Internet_Layer_of_Internet_Protocol.md) is being used.


title: Application Layer
href: Application_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  It doesn't carry any actual user data and thus there is no
  [Application Layer](Application_Layer_of_Internet_Protocol.md) processes above
  it. It's usage is primarily for diagnostics and debugging. When network problems
  occur, ICMP generates messages to report errors back to the source.


title: https://wiki.lineageos.org/devices/taimen/
href: https://wiki.lineageos.org/devices/taimen/
type: markdown
snippet:
  Go to
  [https://wiki.lineageos.org/devices/taimen/](https://wiki.lineageos.org/devices/taimen/),
  download zip, viz.


title: public key
href: bbdcb54f_public_key_cryptography.md
type: markdown
snippet:
  Certificates exist to authenticate domains, prior to the exchange of encrypted
  data. To do this, a server generates a certificate with a reputable Certificate
  Authority, thereby verifying its identity with the CA. It sends this certificate
  (which includes its [public key](./bbdcb54f_public_key_cryptography.md)) when
  initiating a connection with a client.


title: TLS
href: zk/Transport_Layer_of_Internet_Protocol.md
type: markdown
snippet:
  Based on data about the requester, derived from the
  [TLS](/zk/Transport_Layer_of_Internet_Protocol.md) packet headers, the firewall
  decides whether or not to grant access to the requested resource.


title: public key
href: bbdcb54f_public_key_cryptography.md
type: markdown
snippet:
  two keys are used: a [public key](./bbdcb54f_public_key_cryptography.md) to
      encrypt the data and a private key to decrypt it. The public key can be
      shared freely so anyone can encrypt and send data to a peer but only the
      peer can receive and decrypt it


title: certificate
href: Certificate_authorities.md'
type: markdown
snippet:
  The server sends a digital [certificate](./Certificate_authorities.md') key
    The client checks that the certificate is valid


