Skip to content

Instantly share code, notes, and snippets.

View Pezhvak's full-sized avatar
♠️
AWARE

Pezhvak Pezhvak

♠️
AWARE
View GitHub Profile
@erickdsama
erickdsama / rwas.py
Last active March 4, 2024 19:21
Class to read and write messages to Whatsapp through of the ADB. You need a android Device with Sqlite3 installed and ADB service.
# coding=utf-8
import json
import time
from subprocess import check_output, CalledProcessError
class WHO:
FROM_ME = "key_from_me == 1"
OTHERS = "key_from_me != 1"
ALL = ""
@vojtasvoboda
vojtasvoboda / .gitlab-ci.yml
Last active December 5, 2020 16:29
GitLab CI FTP deploy with mwienk/docker-lftp docker image
stages:
- test
- deploy
cache:
paths:
- vendor
# test job
test:
@behzod
behzod / countries.php
Created May 30, 2017 00:03
Countries array in PHP with 2 letter ISO codes and names
<?php
// Pulled from http://api.worldbank.org/countries?format=json&page=1&per_page=500
const CI_COUNTRIES_ARRAY = array (
'AW' => 'Aruba',
'AF' => 'Afghanistan',
'AO' => 'Angola',
'AL' => 'Albania',
'AD' => 'Andorra',
'AE' => 'United Arab Emirates',
'AR' => 'Argentina',
@troyfontaine
troyfontaine / readme.md
Last active April 8, 2024 06:10
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This process requires that you are able to ssh OR log in locally using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customization-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and swap.

NOTE: If you want to be sure that nothing is writing to /home you can either modify the host to boot into single-user mode OR try to use the systemctl isolate runlevel1.target command to switch (not tested! should work).

@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off