Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Wasin Thonkaew haxpor

🎯
Focusing
View GitHub Profile
@haxpor
haxpor / aligned_allocator.cpp
Created Sep 27, 2019 — forked from donny-dont/aligned_allocator.cpp
An aligned allocator for placing SIMD types in std::vector
View aligned_allocator.cpp
#ifdef _WIN32
#include <malloc.h>
#endif
#include <cstdint>
#include <vector>
#include <iostream>
/**
* Allocator for aligned data.
@haxpor
haxpor / install_nginx_macos_source.md
Created Jan 15, 2019 — forked from beatfactor/install_nginx_macos_source.md
Install Nginx on Mac OS from source (without brew)
View install_nginx_macos_source.md

Install Nginx on Mac OS from source

no Homebrew required

1. Download Nginx

$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
@haxpor
haxpor / Android Studio .gitignore
Created Oct 10, 2018 — forked from iainconnor/Android Studio .gitignore
A .gitignore for use in Android Studio
View Android Studio .gitignore
# Built application files
**/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
@haxpor
haxpor / scriptName.php
Last active Feb 6, 2018 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just execute `php scriptName.php`
View scriptName.php
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
// set only for one for safety
$registrationId = 'YOUR-REGISTRATION-ID-GOES-HERE';
// prep the bundle
$msg = array
(
@haxpor
haxpor / README.md
Created Jun 10, 2017 — forked from erichrobinson/README.md
SwitchResX Configuration
View README.md

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
View jekyll-and-liquid.md

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes: