Skip to content

Instantly share code, notes, and snippets.

@myano
myano / gist:5315168
Last active December 15, 2015 19:59
Example
foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.
Viva
@myano
myano / index.md
Last active May 25, 2024 16:51
Merging forked gists into your gist to preserve the history of the gist.

Merging A Forked Gist Into Your Gist

Let's say you have a gist (public or private) and someone forks it and makes changes to it. Awesome! However, now you want to merge in their changes to your gist. Unfortunately, it doesn't seem GitHub supports this via their website at the moment, however, you can still merge the gists with 'git' on the command line.

  1. You want to clone your gist. You can locate the link for this under "Clone this gist"

     ➜  ~/dev » git clone https://gist.github.com/5315168.git
     Cloning into '5315168'...
    

remote: Counting objects: 6, done.

#!/usr/bin/env python
f = open('test.py', 'w')
f.write('Nothing to see here, move along now.')
f.close()
#!/bin/bash
IPTABLES_TARGET="DROP"
IPTABLES_CHAINNAME="TOR"
WORKING_DIR="/tmp/"
# get IP address of eth0 network interface
IP_ADDRESS=$(ifconfig eth0 | awk '/inet addr/ {split ($2,A,":"); print A[2]}')
@myano
myano / money.md
Last active December 16, 2015 17:39

Disclaimer

I take no responsibility in the reliably nor the legitimacy of any of the following websites. I am just listing what is available on the websites listed as headers.

Contribute

You can contribute to this gist by forking it and making modifications and then posting in the comment section about it and I can merge the changes into this gist while preserving the history. Details on how to do this, https://gist.github.com/myano/5315439

@myano
myano / java.py
Created April 29, 2013 03:05
jenni module that pokes fun at Java
def java_exploit(jenni, input):
'''.javaexploit -- Show how long it has been since the last Java exploit'''
page = web.get('http://java-0day.com/')
matches = re.search('new Date\("(.*?)"\)', page)
t = matches.groups()
page2 = web.get('http://istherejava0day.com/')
matches2 = re.search('<a id="answer">\n(.*)', page2)
u = matches2.groups()
if t and u:
MEETING NOTICE
==============
Central Ohio Linux Users Group
Date: Wednesday, May 15 2013 from 7 PM to 9 PM local
Meeting Presentation
==============
Red Hat's Arthur Enright will present Red Hat Cloud Forms.
Arthur will discuss how Open Source has been the primary driver in
@myano
myano / gitio.md
Last active December 16, 2015 23:39

Create git.io Short URLs in Python

git.io is an awesome URL shortener provided by Github. It works when shortening URLs from *.github.com/* to a small https://git.io/ link.

requests

&gt;&gt;&gt; import requests
#!/usr/bin/env zsh
cd /home/yano/dev/adblockplus
wget https://adversity.googlecode.com/hg/Antisocial.txt -O Antisocial.txt
wget https://adversity.googlecode.com/hg/Adversity.txt -O Adversity.txt
wget https://easylist-downloads.adblockplus.org/easylist.txt -O easylist.txt
wget https://indonesianadblockrules.googlecode.com/hg/subscriptions/abpindo.txt -O abpindo.txt
wget https://easylist-downloads.adblockplus.org/easyprivacy.txt -O easyprivacy.txt
wget --no-check-certificate https://secure.fanboy.co.nz/fanboy-adblock.txt -O fanboy-adblock.txt