Skip to content

Instantly share code, notes, and snippets.

View hightemp's full-sized avatar
🎯
Focusing

Anton Panov hightemp

🎯
Focusing
View GitHub Profile
@hightemp
hightemp / test_client.cpp
Created February 5, 2019 14:18
ICMP server and client
#include <string.h>
#include <arpa/inet.h>
#include <stdint.h>
#include <string.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@hightemp
hightemp / vue.md
Last active March 29, 2019 06:30
Ссылки на ресурсы Vue
@hightemp
hightemp / s_datediff.php
Created March 18, 2019 10:46
Difference bitween two dates (relative, seconds, minutes, hours, days, months, years)
<?php
function s_datediff($str_interval, $dt_menor, $dt_maior, $relative=false)
{
if( is_string( $dt_menor)) $dt_menor = date_create( $dt_menor);
if( is_string( $dt_maior)) $dt_maior = date_create( $dt_maior);
$diff = date_diff( $dt_menor, $dt_maior, ! $relative);
switch( $str_interval){
@hightemp
hightemp / EloquentCheatSheet.md
Created March 22, 2019 11:08 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet
@hightemp
hightemp / vue-cookie.js
Created March 29, 2019 11:28
vue-cookie.js
@hightemp
hightemp / universities.txt
Last active April 14, 2019 16:44
List of School(Universities) Websites
University of Alaska http://alaska.edu AK
Alaska Christian College http://alaskacc.edu AK
National Park Community College http://npcc.edu AK
University of Alaska Fairbanks http://uaf.edu AK
University of Arkansas – Fort Smith http://uafs.edu AK
Alabama A&M University http://aamu.edu AL
Athens State University http://athens.edu AL
Auburn University http://auburn.edu AL
Auburn University at Montgomery http://aum.edu AL
Birmingham-Southern College http://bsc.edu AL
@hightemp
hightemp / README.md
Created May 4, 2019 17:55 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@hightemp
hightemp / git-deployment.md
Created May 7, 2019 11:52 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@hightemp
hightemp / gist:d858159abae065d26c1bca6194574c64
Created May 13, 2019 07:46 — forked from mackstann/gist:4229933
Gigantic recursive directory lister
// http://www.olark.com/spw/2011/08/you-can-list-a-directory-with-8-million-files-but-not-with-ls/
#define _GNU_SOURCE
#include <dirent.h> /* Defines DT_* constants */
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/syscall.h>
@hightemp
hightemp / file_get_contents.php
Created May 13, 2019 11:42 — forked from tdebatty/file_get_contents.php
file_get_contents with proxy support
<?php
$context = array();
$proxy = getenv("http_proxy");
if ($proxy !== null) {
$context['http'] = array(
'proxy' => str_replace("http", "tcp", $proxy),
'request_fulluri' => true
);
}