css bullshit- fuck nik

This commit is contained in:
Tyrel Souza 2022-11-03 01:28:47 -04:00
parent e65c99017f
commit 5282fe8de3
10 changed files with 46 additions and 38 deletions

BIN
cache/ArticlesGenerator-Readers vendored Normal file

Binary file not shown.

BIN
cache/PagesGenerator-Readers vendored Normal file

Binary file not shown.

View File

@ -23,7 +23,7 @@ This will list keys such as
.. code:: console
pub 4096R/01A53981 2011-11-09 [expires: 2016-11-07]
uid         Tyrel Anthony Souza (Five year key for email.)
uid Tyrel Anthony Souza (Five year key for email.)
sub 4096R/C482F56D 2011-11-09 [expires: 2016-11-07]
To make this not expire, (same steps to change expiration date to another time), you must first edit the key
@ -42,11 +42,11 @@ Type “expire” in and you will be prompted for how long to change it to
Changing expiration time for the primary key.
Please specify how long the key should be valid.
        0 = key does not expire
      <n> = key expires in n days
     <n>w = key expires in n weeks
     <n>m = key expires in n months
     <n>y = key expires in n years
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
You are then done setting the expiration on the primary key, if you have sub key, doing this is as easy as typing ``key 1`` and repeating the expiration step.

View File

@ -7,10 +7,10 @@ Some BASH tips
:slug: some-bash-tips
:status: published
I realize I havent updated in a while. I havent had much free time recently as Ive been working on a project for my father in C# after work hours. This is a great change from only working in Python and JavaScript recently. Im making a program that will analyze test results from a plasma torch for a company called HyperTherm. My father built the physical machine, but the employees want something that they can better see the results of a passed torch unit, or a failed torch unit. This program has a bar code scanner that scans the tool used in the test and matches it up to the lot of torch parts. Another added feature is the ability to print a white label that says “UNIT PASSED” or a giant red label that says the unit failed and which of the 8 tests failed were. I had to learn how to use delegates, as my serial event listener is on a separate thread and I cant update labels, or parts of the User Interface without them.  Still working on it, hopefully will wrap it up by Saint Patricks day.
I realize I havent updated in a while. I havent had much free time recently as Ive been working on a project for my father in C# after work hours. This is a great change from only working in Python and JavaScript recently. Im making a program that will analyze test results from a plasma torch for a company called HyperTherm. My father built the physical machine, but the employees want something that they can better see the results of a passed torch unit, or a failed torch unit. This program has a bar code scanner that scans the tool used in the test and matches it up to the lot of torch parts. Another added feature is the ability to print a white label that says “UNIT PASSED” or a giant red label that says the unit failed and which of the 8 tests failed were.I had to learn how to use delegates, as my serial event listener is on a separate thread and I cant update labels, or parts of the User Interface without them. Still working on it, hopefully will wrap it up by Saint Patricks day.
I recently found a cool command in BASH that I hadnt previously known.  ``C-o`` will execute the current line, and then bring the following line up from BASH history. If you have a set of commands you want to execute again, rather than having to press up 20 times, hit enter, press up 19 times, hit enter, and so on… You can just hit up 20 times. Press C-o as many times as you need to.
I recently found a cool command in BASH that I hadnt previously known. ``C-o`` will execute the current line, and then bring the following line up from BASH history. If you have a set of commands you want to execute again, rather than having to press up 20 times, hit enter, press up 19 times, hit enter, and so on… You can just hit up 20 times. Press C-o as many times as you need to.
For example:

View File

@ -47,15 +47,14 @@ Notice how it says your package is not in ``/usr/lib/python2.7/site-packages/``
Virtualenvwrapper
-----------------
After you create a virtual environment, you just run ``source bin/activate`` and it will activate the virtual environment. This can get tedious knowing exactly where your virtual environments are all the time, so some developers wrote some awesome scripts to fix that problem. This is called ``virtualenvwrapper`` and once you use it once, you will always want to use it more. What it does is that it has you create a hidden directory in your home directory, set that to an environment variable and references that directory as the basis for your virtual environments. The installation of this is pretty easy, you can ``pip install virtualenvwrapper`` if you want, or download the package and compile by hand.
After you create a virtual environment, you just run``source bin/activate`` and it will activate the virtual environment. This can get tedious knowing exactly where your virtual environments are all the time, so some developers wrote some awesome scripts to fix that problem. This is called``virtualenvwrapper`` and once you use it once, you will always want to use it more. What it does is that it has you create a hidden directory in your home directory, set that to an environment variable and references that directory as the basis for your virtual environments. The installation of this is pretty easy, you can``pip install virtualenvwrapper`` if you want, or download the package and compile by hand.
Once installed correctly, you can run the command ``mkvirtualenv envname`` to create a virtual environment. You can then run ``workon envname`` from anywhere, and it will activate that environment. For example, you could be at ``/var/www/vhosts/www.mysite.com/django/`` and run ``workon envname`` and it would activate the environment from there. This isnt a required package (none of them are really…) as I went a couple years without using ``virtualenvwrapper``, but it is very useful and now I use it every day. Some tips I use with my setup of ``virtualenvwrapper`` is that I use the postactivate scripts to automatically try to change into the proper project directory of my environment. This also means I usually name my ``virtualenv`` after my project name for easy memory. It makes no sense to have a project called “cash_register” but the ``virtualenv`` be called “fez”. This is how I change to the right project after activating my ``virtualenv``. This goes in ``$WORKON_HOME/postactivate``
Once installed correctly, you can run the command ``mkvirtualenv envname`` to create a virtual environment. You can then run``workon envname`` from anywhere, and it will activate that environment. For example, you could be at``/var/www/vhosts/www.mysite.com/django/`` and run``workon envname`` and it would activate the environment from there. This isnt a required package (none of them are really…) as I went a couple years without using``virtualenvwrapper``, but it is very useful and now I use it every day. Some tips I use with my setup of``virtualenvwrapper`` is that I use the postactivate scripts to automatically try to change into the proper project directory of my environment. This also means I usually name my``virtualenv`` after my project name for easy memory. It makes no sense to have a project called “cash_register” but the``virtualenv`` be called “fez”. This is how I change to the right project after activating my ``virtualenv``. This goes in ``$WORKON_HOME/postactivate``
.. code:: bash
#!/bin/bash
# This hook is run after every virtualenv is activated.
# if its a work or a personal project (Example)
proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}')
if [[ -e "/Users/tsouza/PersonalProjects/$proj_name" ]]

View File

@ -17,7 +17,6 @@ Our solution is to prefetch for any M2M that are related to the current Model.
.. code:: python
def formfield_for_manytomany(self, db_field, request, **kwargs):
if db_field.__class__.__name__ == "ManyToManyField" and \
db_field.rel.to.__name__ == self.model.__name__:

View File

@ -9,13 +9,13 @@ How to not trigger a post_save in Django, but still modify data.
Recently I have been diving into using signals with Django, which of course are pretty neat.
I am working on a website for work which in the most basic explanation, is a task management site. Recently I have added in the ability to subscribe to tasks and get emails, I did this by connecting to the post_save signal. I only email out when a task is changed, not created (of course, no one would be subscribed to it). This worked flawlessly and “emails” out to anyone who is subscribed. I say that in quotes, because I havent actually hooked it up to a real SMTP server, and only use
I am working on a website for work which in the most basicexplanation, is a task management site. Recently I have added in the ability to subscribe to tasks and get emails, I did this by connecting to the post_save signal. I only email out when a task is changed, not created (of course, no one would be subscribed to it). This worked flawlessly and “emails” out to anyone who is subscribed. I say that in quotes, because I havent actually hooked it up to a real SMTP server, and only use
.. code:: console
.. code:: shell
python -m smtpd -n -c DebuggingServer localhost:1025
which will output any emails to stdout.  But I digress… A problem arose when I was working on ordering tasks.
which will output any emails to stdout. But I digress… A problem arose when I was working on ordering tasks.
I store an integer in the “ordering” column, which any authenticated user can drag the row to a new location and that will reorder the task. I did this after I setup the emailing signal, so I didnt think about an email being sent out for EVERY task being changed.

View File

@ -9,7 +9,7 @@ SSH Agent on “boot”
I had a friend complain that he had to keep adding his ssh key to his ssh-agent every time he rebooted. I have a really easy bit of shell code you can put into your .bashrc or your .zshrc file:
.. code-block:: bash
.. code:: bash
SSHKEYFILE=/path/to/your/ssh/key/file
ssh-add -l | grep -q $SSHKEYFILE

View File

@ -53,19 +53,18 @@ article ul {
.amp {color:#666; font-size:1.05em;font-family:"Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua",serif; font-style:italic;}
.dquo {margin-left:-.38em;}
.parent-panel { padding-left:20%;width:100%; }
.right-panel { position:relative;float:left;width:100%; }
.right-panel-content {
max-width: 60%;
border-left: 2px dashed #b58900;
min-height: 96vh;
padding-left: 0.75rem;
}
.right-panel-content img {
margin: 1rem;
max-width: 50rem;
@media screen and (min-width: 700px) {
.parent-panel { padding-left:20%;width:100%; }
.right-panel { position:relative;float:left;width:100%; }
.right-panel-content {
max-width: 60%;
padding-left: 0.75rem;
}
.left-panel {
position:relative;
@ -75,6 +74,18 @@ article ul {
margin-left:-101%;
text-align:right;
}
}
@media screen and (max-width: 700px) {
.left-panel {
border: 2px dashed #b58900;
}
}
.right-panel-content img {
margin: 1rem;
max-width: 50rem;
}
.small {
font-size: 0.75rem;

View File

@ -5,7 +5,6 @@
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
{% endif %}