Skip to content

Instantly share code, notes, and snippets.

View DJviolin's full-sized avatar

István Lantos DJviolin

View GitHub Profile
@nguyenanhtu
nguyenanhtu / SSLXampp.md
Last active July 12, 2024 19:06
Guide to configure SSL in XAMPP for Windows

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
@r0l1
r0l1 / copy.go
Last active March 24, 2025 21:38
Copy a directory tree (preserving permissions) in Go.
/* MIT License
*
* Copyright (c) 2017 Roland Singer [[email protected]]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
/**
* Code from:
* https://github.com/expressjs/express/pull/2809
*
* Target Express version: { "express": "^4.14.0 <5.0.0" }
*
* This monkey patch allows to return Promises from middleware and route handlers, rejections will be handled automaticaly.
*
* Please note:
* If you return something from `(...) -> void` callbacks - you shoot your own leg.
@andrewvaughan
andrewvaughan / lite-packages.txt
Created May 2, 2016 23:19
Packages included on Raspbian Jesse Lite
pi@raspberrypi:~ $ aptitude search '~i!~M'
i acl - Access control list utilities
i adduser - add and remove users and groups
i apt - commandline package manager
i apt-utils - package management related utility program
i aptitude - terminal-based package manager
i aptitude-common - architecture independent files for the apt
i avahi-daemon - Avahi mDNS/DNS-SD daemon
i base-files - Debian base system miscellaneous files
i base-passwd - Debian base system master password and gro
@timothyis
timothyis / gulpfile.babel.js
Last active August 21, 2024 00:29
Gulp 4, ES6 gulpfile example
// Gulp module imports
import {src, dest, watch, parallel, series} from 'gulp';
import del from 'del';
import livereload from 'gulp-livereload';
import sass from 'gulp-sass';
import minifycss from 'gulp-minify-css';
import jade from 'gulp-jade';
import gulpif from 'gulp-if';
import babel from 'gulp-babel';
import yargs from 'yargs';
@MikeNGarrett
MikeNGarrett / wp-config.php
Last active May 12, 2025 16:13
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url
@davidrleonard
davidrleonard / csv-difference.py
Last active November 1, 2016 21:03
Compare two CSVs, output the difference between them
# Compares two CSVs and outputs a new CSV that excludes the intersection
# i.e.:
# $ python csv-difference.py -d fulldataset.csv -s subset.csv -o output.csv -u id -k id email name
import argparse
from csv import DictReader
from csv import DictWriter
def main():
parser = argparse.ArgumentParser(description='Output difference in CSVs.')
@demisx
demisx / gulpfile.js
Last active July 14, 2022 16:06
Gulp 4 gulpfile.js
// Gulp 4
var gulp = require('gulp');
var using = require('gulp-using');
var grep = require('gulp-grep');
var changed = require('gulp-changed');
var del = require('del');
var coffee = require('gulp-coffee');
var less = require('gulp-less');
var coffeelint = require('gulp-coffeelint');
var sourcemaps = require('gulp-sourcemaps');
@rgaidot
rgaidot / Awesome-Electronic-and-Hardware-platform.md
Last active June 16, 2024 02:33
Awesome Electronic and Hardware platform
@kjmkznr
kjmkznr / benchmark.md
Last active July 18, 2016 17:58
using lwan from golang

benchmark result

EC2 m3.medium / Gentoo Linux

go version go1.3.3 linux/amd64

$ ./wrk http://localhost:8081/hello
Running 10s test @ http://localhost:8081/hello
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev