Difference between revisions of "User:Saul"

From Organic Design wiki
m ((Yet another punctuation fix))
(Added VPS snippet)
Line 3: Line 3:
 
== Snippets: ==
 
== Snippets: ==
 
=== BASH: ===
 
=== BASH: ===
 +
 +
==== VPS Proxy ====
 +
To proxy traffic over port 1080 run:
 +
<source lang="bash">
 +
ssh -NCD 1080 user@ip
 +
</source>
 +
Then in Firefox go: Edit -> Preferences -> General -> Network Proxy (near the bottom) and modify the following settings:
 +
<source>
 +
Manual Proxy Configuration
 +
Socks Host: localhost
 +
port: 1080
 +
</source>
  
 
==== Alias ====
 
==== Alias ====
 
To save a command run:
 
To save a command run:
 
<source lang="bash">
 
<source lang="bash">
alias COMMANDNAME="COMMAND";
+
alias COMMANDNAME="COMMAND"
 
</source>
 
</source>
 
This will be lost on reboot however so to save it run:
 
This will be lost on reboot however so to save it run:
 
<source lang="bash">
 
<source lang="bash">
echo "alias COMMANDNAME=\"COMMAND\";" >> ~/.bashrc;
+
echo "alias COMMANDNAME=\"COMMAND\";" >> ~/.bashrc
 
</source>
 
</source>
  

Revision as of 02:32, 15 March 2018

I like to be making notes for MySQL, MongoDB, PHP, Javascript, Node.js, Feathers.js and other technologies. I am a friend to linux and open-source programs.

Snippets:

BASH:

VPS Proxy

To proxy traffic over port 1080 run:

ssh -NCD 1080 user@ip

Then in Firefox go: Edit -> Preferences -> General -> Network Proxy (near the bottom) and modify the following settings:

Manual Proxy Configuration
Socks Host: localhost
port: 1080

Alias

To save a command run:

alias COMMANDNAME="COMMAND"

This will be lost on reboot however so to save it run:

echo "alias COMMANDNAME=\"COMMAND\";" >> ~/.bashrc

Random Password Generation

A useful command to generate a random password of 10 characters:

</dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c 10 ; echo

CSS:

CSS Sticky Footer:

body .site{
	display: flex !important;
	min-height: 100vh !important;
	flex-direction: column !important;
}

#content {
	flex: 1 !important;
}

Note: in Wordpress the user bar will make the page need to scroll so logout to see it properly.

CSS Same Height Columns:

.Container{
	display: flex;
}

.Column{
	flex: 1; /* optional to equalize widths */
}

Useful links in this wiki

Cool Projects