Skip to content

Instantly share code, notes, and snippets.

View omps's full-sized avatar

Om Prakash Singh omps

View GitHub Profile
@omps
omps / simple_mta.md
Created September 5, 2022 15:49 — forked from n3dst4/simple_mta.md
Using Postfix as an MTA so that local mail on a linux box gets delivered to somewhere useful

Simple Postfix MTA Setup for headless hobbyists

So, you're a hobbyist or maybe even a user in a small-scale business capacity and you have some kind of headless Linux (or other *nix) box, maybe it's a VPS or a Raspberry Pi, and you want it to be able to email you with alerts (setting up monitoring is a separate subject!)

History

I went round in circles with this for a while, because it seemed like such a

@omps
omps / unfollow.js
Created August 30, 2020 16:58 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated: 09 April 2020
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
@omps
omps / README.md
Created March 30, 2019 18:33 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@omps
omps / 1-server.sh
Created March 24, 2017 13:54 — forked from duritong/1-server.sh
Creating a pulp upload user
$ pulp-admin auth user create --login jenkins --password xxx
$ pulp-admin auth permission grant --login=jenkins --resource="/v2/content/uploads/" -o read -o update -o create -o delete
$ pulp-admin auth permission grant --login=jenkins --resource="/v2/tasks/" -o read
$ pulp-admin auth permission grant --login=jenkins --resource="/v2/repositories/my-repo/actions/import_upload/" -o create -o execute -o read -o update
$ pulp-admin auth permission grant --login=jenkins --resource="/v2/repositories/my-repo/actions/publish/" -o execute
@omps
omps / cowroot.c
Created October 25, 2016 07:01 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
@omps
omps / git-dmz-flow.md
Created March 14, 2016 11:52 — forked from djspiewak/git-dmz-flow.md
Git DMZ Flow

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea
@omps
omps / rpm-from-source.sh
Last active March 10, 2016 09:46 — forked from fernandoaleman/rpm-from-source.sh
How to create an RPM from source with spec file
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.7.7.3
# Step: 1
# Install rpmbuild
@omps
omps / README.md
Created March 8, 2016 10:05 — forked from radmen/README.md
Apache vhost config for gitlab

unicorn config file

Edit file /home/gitlab/gitlab/config/unicorn.rb

Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it. Uncomment line listen "127.0.0.1:8080"

required modules for apache

  • sudo a2enmod proxy
  • sudo a2enmod proxy_balancer
@omps
omps / xrdp_rhel_centos_6.md
Created March 3, 2016 05:20 — forked from dduvnjak/xrdp_rhel_centos_6.md
Setting up xrdp on RHEL 6

1 - Install the prerequisites for building and installation

yum groupinstall Desktop -y
yum install finger cmake patch gcc make autoconf libtool automake pkgconfig openssl-devel gettext file pam-devel libX11-devel libXfixes-devel libjpeg-devel
yum install flex bison gcc-c++ libxslt perl-libxml-perl xorg-x11-font-utils tigervnc-server git -y
reboot

2 - Get the latest source from the xrdp git repo, build and install

git clone git://github.com/FreeRDP/xrdp.git