Skip to content

Instantly share code, notes, and snippets.

View ninformations's full-sized avatar

Nitin Sharma ninformations

View GitHub Profile
@mowings
mowings / loop.sh
Last active February 4, 2024 22:28
Bash -- sleep until a specific time, like tomorrow midnight
#!/bin/bash
# Sometimes you want to sleep until a specific time in a bash script. This is useful, for instance
# in a docker container that does a single thing at a specific time on a regular interval, but does not want to be bothered
# with cron or at. The -d option to date is VERY flexible for relative times.
# See
# https://www.gnu.org/software/coreutils/manual/html_node/Relative-items-in-date-strings.html#Relative-items-in-date-strings
# For details
# ALPINE USERS: You will need to install coreutils, as the built-in busybox date does not handle -d correctly.
@okutbay
okutbay / free_email_provider_domains.txt
Last active July 4, 2024 12:04 — forked from tbrianjones/free_email_provider_domains.txt
Most complete list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created. I also created a service for it https://emailprovider.yonetic.im/ and use this list in my free link shortener service ht…
This file has been truncated, but you can view the full file.
0-00.usa.cc
0-180.com
0-30-24.com
0-420.com
0-900.com
0-aa.com
0-mail.com
0-z.xyz
0.pl
00.pe
@lazypower
lazypower / setup.md
Last active April 23, 2022 13:16
Run Minikube in LXD

Running Minikube via LXD

I make some assumptions, and make no claims in how well supported this is or ever will be. I wanted to avoid using VMs because i've been working in containers for the last half decade. It made sense to just skip the middle man and use a machine type container system to run my minikube workloads.

Why not juju?

Simply put, Juju does a fantastic job; but to stay objective I wanted to achieve minikube in LXD as a functional alternative to juju deploy kubernetes-core, or using KVM/VirtualBox in this solution.

@neunhoef
neunhoef / docker-compose.yml
Created December 7, 2016 11:08
Docker compose file to start a local arangodb cluster
version: '2'
services:
agency:
image: arangodb/arangodb
environment:
- ARANGO_NO_AUTH=1
command: arangod --server.endpoint tcp://0.0.0.0:5001 --server.authentication false --agency.activate true --agency.size 1 --agency.supervision true --database.directory /var/lib/arangodb3/agency1
coordinator:
image: arangodb/arangodb
@JustThomas
JustThomas / wordpress-multisite-internal-redirect-loop.md
Last active June 19, 2024 15:34
WordPress Multisite: How to fix error "too many redirects"

WordPress Multisite: How to fix error "Request exceeded the limit of 10 internal redirects"

I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

The problem was, in my case, one specific rewrite rule in the .htaccess file.

Problem description

@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@jaydeepw
jaydeepw / enableHTML5AppCache.java
Last active October 5, 2023 11:39
Enabling HTML5 AppCache in Android Webview programatically.
private void enableHTML5AppCache() {
webView.getSettings().setDomStorageEnabled(true);
// Set cache size to 8 mb by default. should be more than enough
webView.getSettings().setAppCacheMaxSize(1024*1024*8);
// This next one is crazy. It's the DEFAULT location for your app's cache
// But it didn't work for me without this line
webView.getSettings().setAppCachePath("/data/data/"+ getPackageName() +"/cache");
@bartprokop
bartprokop / POM.xml
Created June 9, 2012 20:35
JPA 2.0 for GAE with Maven
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!-- Project description -->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>bart.prokop.name</groupId>
<artifactId>parent-pom</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//