Skip to content

Instantly share code, notes, and snippets.

View pavanyogi's full-sized avatar
🎯
Focusing

Pavan Yogi pavanyogi

🎯
Focusing
  • Bengaluru, India.
View GitHub Profile
create databae test;
@pavanyogi
pavanyogi / sources.list
Created July 14, 2018 20:43 — forked from justbuchanan/sources.list
/etc/apt/sources.list from an Ubuntu 14.04 installation
#deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
@pavanyogi
pavanyogi / lytics-6.css
Last active August 7, 2019 16:01
lytics css
p {
font-size: 50px;
}
@pavanyogi
pavanyogi / custom-registration.php
Created May 12, 2020 13:47 — forked from trslater/custom-registration.php
Custom Registration Plugin
<?php
/*
Plugin Name: Custom Registration
Description: Updates user rating based on number of posts.
Version: 1.1
Author: Tristan Slater w/ Agbonghama Collins
Author URI: http://kanso.ca
*/
@pavanyogi
pavanyogi / code-review-checklist.md
Created March 12, 2021 07:31 — forked from nerandell/code-review-checklist.md
PHP Code Review Guidelines

Make sure these boxes are checked before submitting/approving the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions
  • Names are simple and if possible short
  • Names are spelt correctly
  • Names contain units where applicable
  • There are no usages of magic numbers
@pavanyogi
pavanyogi / battery-full.sh
Last active September 21, 2022 12:08
set battery full charge alert notification with sound play
#!/bin/bash
# sudo apt install acpi
# cd
# wget https://gist.githubusercontent.com/pavanyogi/681fa31cd2fce0b1c8123f42e98f2053/raw/56ef38e90e6d6bdcacb1aba23b57b7ced8838699/battery-full.sh
# sudo chmod -v +x battery-full.sh
# sudo mv -v battery-full.sh /usr/local/bin
# add the command to startup applications
# /usr/local/bin/battery-full.sh
COUNTER=10
while true; do
@pavanyogi
pavanyogi / auto-remove-sublime-license-popup
Created January 18, 2022 07:49 — forked from egel/auto-remove-sublime-license-popup
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@pavanyogi
pavanyogi / curl.md
Created February 21, 2022 15:06 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.