Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing on playing ;)

Kamrul Ahsan k4mrul

🎯
Focusing on playing ;)
Block or report user

Report or block k4mrul

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@glof2
glof2 / spacepaper.pyw
Last active Jan 16, 2020
Sets your wallpaper to NASA's picture of the day
View spacepaper.pyw
import requests
from bs4 import BeautifulSoup
from os import path, getcwd
import ctypes
import time
def windowswallpaper(image):
SPI_SETDESKWALLPAPER = 20
ctypes.windll.user32.SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, image, 0)
@dusta
dusta / Deploy_on_cPanel.md
Last active Dec 31, 2019 — forked from oodavid/README.md
Deploy your site with git on cPanel
View Deploy_on_cPanel.md

Deploy your site with git on cPanel

The most important: You must have shell access!

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
@akosveres
akosveres / mariadb.yml
Last active Jan 16, 2020
Mariadb + phpmyadmin docker-compose
View mariadb.yml
version: "2"
services:
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=test
- MYSQL_DATABASE=radio
volumes:
- ./database:/var/lib/mysql
phpmyadmin:
@lukecav
lukecav / functions.php
Last active Oct 2, 2019 — forked from eteubert/wordpress-passwort-reset-unmultisite.php
WordPress Multisite: Password Reset on a Subsite.
View functions.php
/**
* Password reset on sub site (1 of 4)
* Replace login page "Lost Password?" urls.
*
* @param string $lostpassword_url The URL for retrieving a lost password.
* @param string $redirect The path to redirect to.
*
* @return string
*
* @since 1.0.0
@frgomes
frgomes / install-docker.sh
Last active Dec 18, 2019
Debian - install docker in Debian Jessie
View install-docker.sh
#!/bin/bash
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y
sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@leonardofed
leonardofed / README.md
Last active Jan 21, 2020
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


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.


View Listen on UDP using netcat
# create an UDP server using nc on port 11090
nc -ul 11090
# check whether an UDP server is listening on 11190
nc -vz -u <hostname> 11090
# send a packet to the UDP server
echo -n "hello" | nc -4u -w1 <hostname> 1118
@stephenharris
stephenharris / copy-pre.css
Last active Dec 30, 2019
Adding a 'copy' button to <pre> content
View copy-pre.css
.pre-wrapper{
position:relative;
}
.pre-wrapper pre{
padding-top: 25px;
}
.pre-wrapper .copy-snippet {
border-radius: 0;
min-width:55px;
background: none repeat scroll 0 0 transparent;
View raspberry-pi-vpn-router.md

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@azizultex
azizultex / Piklist Widget with Group Fields
Last active Feb 7, 2019
Piklist Widget with Group Fields
View Piklist Widget with Group Fields
<?php
piklist('field', array(
'type' => 'text'
,'field' => 'title'
,'label' => 'Title'
));
piklist('field', array(
'type' => 'group'
You can’t perform that action at this time.