Skip to content

Instantly share code, notes, and snippets.

View ohDaddyPlease's full-sized avatar
:shipit:
pew-pew. pow-pow. paff-paff

Sergius Novikov ohDaddyPlease

:shipit:
pew-pew. pow-pow. paff-paff
  • Siberia
View GitHub Profile
@codedokode
codedokode / js-task-1.md
Last active May 18, 2025 16:40
Задания на яваскрипт (простые)
@tott
tott / ip_in_range.php
Created November 27, 2013 22:46
php check if IP is in given network range
/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {
if ( strpos( $range, '/' ) == false ) {
$range .= '/32';
}
//One can make use of the following script to generate menus in an animated fashion. There are several ways of creating a menu such as list, drop down and many more.
function makeMenu(items, tags) {
// default tags
tags = tags || ['ul','li'];
var parent = tags[0];
var child = tags[1];
var item, value = '';
for (var i = 0,l = items.length; i < l; i++) {
item = items[i];
@border
border / long_polling.go
Created September 25, 2012 09:58
long polling for golang
package main
import (
"container/list"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@joshhartman
joshhartman / randomPassword.php
Last active July 7, 2024 09:12
Human Readable Password Generator (Requires PHP 7.1+)
<?php
function randomPassword( $len = 10, $ucfirst = true, $spchar = true ){
/* Programmed by Christian Haensel
* [email protected]
* http://www.chftp.com
*
* Exclusively published on weberdev.com.
* If you like my scripts, please let me know or link to me.
* You may copy, redistribute, change and alter my scripts as
* long as this information remains intact.