Skip to content

Instantly share code, notes, and snippets.

@deepaksp
deepaksp / adb-dns.bat
Created August 8, 2023 12:56 — forked from sharunkumar/adb-dns.bat
Enabling / Disabling private DNS in android via ADB
rem to disable private dns
adb shell settings put global private_dns_mode off
rem to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com
@deepaksp
deepaksp / local_google_fonts.php
Last active July 7, 2023 15:00
Google Fonts to Local Fonts - make google font as local font without any hassle with php
<?php
$css_name = 'ko_gothic.css';
$font_link = '/resources/themes/interad/assets/css';
$base_dir = __DIR__ . '/resources/themes/interad/assets/css';
$file = 'https://fonts.googleapis.com/css2?family=Nanum+Gothic&display=swap';
$options = array('http' => array('user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36'));
$context = stream_context_create($options);
@deepaksp
deepaksp / clean-up-boot-partition-ubuntu.md
Created February 29, 2020 20:19 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@deepaksp
deepaksp / profile.json
Last active August 3, 2019 04:05 — forked from shanselman/profile.json
Windows Terminal Profile
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"initialCols" : 100,
"initialRows" : 30,
"keybindings" :
[
{
@deepaksp
deepaksp / spinx.sh
Last active September 6, 2022 19:10
#!/bin/bash
ARG=$1
if [ "$ARG" = "-i" ] || [ "$ARG" = "-a" ]; then
echo 'Website Name ? (example.com)'
read site
echo 'Website Script Directory ? (/var/www/example)'
read site_dir
@deepaksp
deepaksp / setup-server.sh
Last active January 8, 2019 04:36
Script to Install Php7.x-Fpm Nginx Mysql Webmin and Supervisor Automatically (No Interaction)
#!/bin/bash
site="example"
site_name="example.com"
site_dir="/var/www/example/public"
mysql_pass="test123"
webmin_pass="test321"
php_ver="php7.3"
install_base=true