Skip to content

Instantly share code, notes, and snippets.

View erm3nda's full-sized avatar
😑
Expressionless master

m3nda erm3nda

😑
Expressionless master
  • n0n3
  • localhost
View GitHub Profile
@jnerin
jnerin / oom_score_values.sh
Last active August 29, 2015 13:57
oneliners to explore the oom_score* values
#!/bin/bash
# Linked from: https://plus.google.com/+JorgeNer%C3%ADn/posts/3zdnEnXFN7Z
# Some oneliners to explore the oom_score* values:
# Processes with oom_score_adj != 0:
grep . /proc/*/oom_score_adj | grep -v ":0" | grep -v self | perl -ne 'm@/([0-9]+)/oom_score_adj:(-?[0-9]+)@; ($pid,$score)=($1,$2); open FILE,"<","/proc/$pid/cmdline"; $cmd=<FILE>; $cmd=~s/\0.*//; close FILE; print "$score\t$pid\t$cmd\n"; '
# In my system the results sumarized are:
# adj name
@gregmalcolm
gregmalcolm / unixfu (python)
Created September 26, 2011 05:01
Unix Fu Presentation commands (python)
Presentation slides and list of commds are available at:
https://github.com/gregmalcolm/unix_for_programmers_demo
NOTE: I used a Mac with OSX for this demo. Other unixes will differ slightly in behavior!
Examples are all written in Python 2.7
===========
Preparation
===========
@eri-trabiccolo
eri-trabiccolo / featured_image_in_pages.php
Last active April 27, 2019 21:51
Show featured image in pages
@MerlinSmiles
MerlinSmiles / Gestures_2-3TapClick.reg
Last active June 13, 2019 02:44 — forked from dpower-lv/Gestures_2TapMiddleClick.reg
Dell ALPS - Registry hack to add right-click as a 2 finger tap and middle-click as a 3 finger tap gesture
Windows Registry Editor Version 5.00
; 2-tap right click and 3-tap middle click
; current user
[HKEY_CURRENT_USER\SOFTWARE\Alps\Apoint\Gesture]
"2TapSupport"=dword:00000003
"2TapShow"=dword:00000009
"Enable2Tap"=dword:00000001
"2TapFunc"=dword:0000000d
@joanhey
joanhey / Dockerfile
Last active August 19, 2019 11:05
Docker con apache y php7
FROM php:7.0-apache
RUN apt-get update \
&& apt-get install -y git zlib1g-dev \
&& docker-php-ext-install zip opcache\
&& a2enmod rewrite \
&& sed -i 's!/var/www/html!/var/www!g' /etc/apache2/apache2.conf
WORKDIR /var/www
section "InputClass"
Identifier "SynPS/2 Synaptics TouchPad"
MatchIsTouchpad "on"
Driver "libinput"
Option "Tapping" "on"
EndSection
@rsvp
rsvp / netspeed.sh
Last active May 13, 2020 15:08
netspeed.sh : check download speed rate via command line | Linux bash script
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2013-07-11
#
# _______________| netspeed : check download speed via command line.
#
# Usage: netspeed [tokyo, london, usw, use, east, west, URL]
# ^default U.S. west coast.
# [ -speed_KB/sec ]
# ^negation activates the Mbps converter.
#
@bburky
bburky / instant-wordpress.sh
Created March 3, 2014 03:20
Instantly download and run WordPress using SQLite
#!/bin/sh
# One line:
# curl -L http://git.io/wp.sh | sh
# Optionally specify port number:
# curl -L http://git.io/wp.sh | PORT=8888 sh
# The directory "wordpress" will be created in the current directory.
test -e wordpress && echo "wordpress/ already exists" && exit
@rozifus
rozifus / Python SimpleHTTPServer with SSL
Last active October 9, 2022 22:40
Python SimpleHTTPServer with SSL
# useful for running ssl server on localhost
# which in turn is useful for working with WebSocket Secure (wss)
# copied from http://www.piware.de/2011/01/creating-an-https-server-in-python/
@elsnosrap
elsnosrap / adb-wrapper.sh
Created May 17, 2014 19:19
A useful shell script that wraps Android adb commands when multiple devices or emulators are connected. The script will prompt for a device or emulator to run the command against, if it detects multiple devices / emulators.
#!/bin/bash
# This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use
# Then it'll pass whatever commands to that specific device or emulator.
# Run adb devices once, in event adb hasn't been started yet
BLAH=$(adb devices)
# Grab the IDs of all the connected devices / emulators
IDS=($(adb devices | sed '1,1d' | sed '$d' | cut -f 1 | sort))