Skip to content

Instantly share code, notes, and snippets.

@himito
himito / brightness.sh
Created November 20, 2017 09:42
Control Brightness
xrandr --output $(xrandr -q | awk '/ connected / {print $1}') --brightness 0.8
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 13, 2024 10:59
A badass list of frontend development resources I collected over time.
@urish
urish / gist:4958044
Last active December 13, 2015 18:49
Small Valentine's Gift for GDG leads worldwide :-)
/* Copyright (C) 2013, Uri Shaked, GDG Tel-Aviv Lead. */
var jq = document.createElement("script");
jq.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");
jq.setAttribute("type", "text/javascript");
jq.onload = function () {
$ = jQuery;
function e(e, t) {
return e + Math.random() * (t - e)
}
function t(t) {
@opnchaudhary
opnchaudhary / pentestTools.sh
Last active August 9, 2018 02:25
This script will download the security tools needed for pentesting in fedora
#!/bin/sh
#Reconnaissance
yum install dsniff hping3 nc6 nc ncrack ngrep nmap nmap-frontend p0f sing scanssh scapy socat tcpdump unicornscan wireshark-gnome xprobe2 nbtscan tcpxtract firewalk hunt dnsenum iftop argus ettercap ettercap-gtk packETH iptraf pcapdiff etherape lynis netsniff-ng tcpjunk ssldump yersinia net-snmp openvas-client openvas-scanner
#Forensics
yum install ddrescue gparted hexedit testdisk foremost sectool-gui scanmem sleuthkit unhide examiner dc3dd afftools srm firstaidkit-plugin-all ntfs-3g ntfsprogs
#Web Application Testing
yum install httping nikto ratproxy lbd skipfish
@ielshareef
ielshareef / 0_how-to-use-embeddedmodelfield-in-django-admin.md
Created June 28, 2012 12:45
How to use EmbeddedModelField in Django's admin

How to Use EmbeddedModelField in Django's admin

by Ismail Elshareef

Problem

If you're using MongoDB with Django, you will need to manage ListField and EmbeddedModelField type fields in Django's admin module. Unfortunately, that's not so easy to do out of the box. You need to do some hacking to get it done. Here's a good link on how to use ListField in admin https://gist.github.com/1200165.

Now let's find out how we can use EmbeddedModelField with admin. Let's start hacking :)

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@jonashaag
jonashaag / 0-howto-listfield-django-admin.rst
Created September 7, 2011 09:41
Howto use ListFields in Django's admin

Howto use ListFields in Django's admin

Problem

Consider this blog post model:

models.py

@paulononaka
paulononaka / JavaIntToLittleEndianUnsigned
Created April 7, 2011 17:22
Convert a Int (in Java, big endian signed) to LittleEndian unsigned
private static byte[] intToLittleEndian(long numero) {
ByteBuffer bb = ByteBuffer.allocate(4);
bb.order(ByteOrder.LITTLE_ENDIAN);
bb.putInt((int) numero);
return bb.array();
}
// OR ...
private static byte[] intToLittleEndian(long numero) {
@vxnick
vxnick / gist:380904
Created April 27, 2010 15:52
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',