Skip to content

Instantly share code, notes, and snippets.

@inix
inix / https-on-localhost.md
Created September 14, 2024 14:38 — forked from adnan360/https-on-localhost.md
Use HTTPS on Localhost (XAMPP, Windows)

Sometimes some websites require https to work. This can be useful in those cases.

This has been tested with XAMPP (PHP 7.0.8) on Windows 7. Please see the Reference links at the end if in confusion about some step.

STEP 1: Editing Configs

Open:

C:\xampp\php\php.ini
@inix
inix / .screenrc
Created November 23, 2018 01:33 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@inix
inix / var_dump-log.php
Created August 20, 2016 15:48 — forked from mkolb/var_dump-log.php
var_dump into error log
<?php
ob_start();
var_dump($this);
$contents = ob_get_contents();
ob_end_clean();
error_log($contents);
?>
@inix
inix / multiple_ssh_setting.md
Created August 18, 2016 01:13 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@inix
inix / build.gradle
Created March 9, 2016 03:29 — forked from ph0b/build.gradle
sample build.gradle for generating split APKs per ABI
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@inix
inix / genymotionwithplay.txt
Created March 8, 2016 07:45 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@inix
inix / gist:d682e4e72cb6aea16132
Last active August 29, 2015 14:05
simple http server that send chunk respomse
use IO::Socket::INET;
$| = 1;
#response头部
my $response_hdr = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nServer: perl tcp server\r\nTransfer-Encoding: chunked\r\nConnection: Keep-Alive\r\n\r\n";
#创建socket,并且监听8888端口
$socket = new IO::Socket::INET (
LocalHost => '0.0.0.0',
LocalPort => '8888',
@inix
inix / http.pl
Last active December 22, 2015 02:19
simple http chunk
use IO::Socket::INET;
$| = 1;
#发给客户端的响应
my $response_hdr = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nServer: perl tcp server\r\nTransfer-Encoding: chunked\r\nConnection: close\r\n\r\n";
my $response_body = "4\r\nWiki\r\n5\r\npedia\r\nE\r\n in\r\n\r\nchunks.\r\n0\r\n\r\n";
my $response = $response_hdr.$response_body;
#创建socket,并且监听8888端口
$socket = new IO::Socket::INET (
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
use Regexp::Grammars;
my $grammar = qr{
<nocontext:>
<Line>
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
use Regexp::Grammars;
my $grammar = qr{
<nocontext:>
<Line>