Skip to content

Instantly share code, notes, and snippets.

View SiriusDely's full-sized avatar

Sirius Dely SiriusDely

View GitHub Profile
@SiriusDely
SiriusDely / HOWTO.md
Created November 3, 2017 22:22 — forked from cvan/HOWTO.md
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@SiriusDely
SiriusDely / s3_test.py
Last active October 8, 2017 09:27 — forked from tomviner/s3_test.py
Simple example of an S3 django storage backend saving a file from local and url
import os
import urllib2
import contextlib
import StringIO
from django.core.files.storage import get_storage_class, FileSystemStorage
from django.core.files import File
from django.conf import settings
from galleries.models import GalleryImage
@SiriusDely
SiriusDely / redis.config
Created June 14, 2017 07:40 — forked from yustam/redis.config
Install Redis on Elastic Beanstalk
packages:
yum:
gcc-c++: []
make: []
sources:
/home/ec2-user: http://download.redis.io/releases/redis-2.8.4.tar.gz
commands:
redis_build:
command: make
cwd: /home/ec2-user/redis-2.8.4
@SiriusDely
SiriusDely / bindings-cheat-sheet.md
Created June 7, 2017 07:29 — forked from eendeego/bindings-cheat-sheet.md
Node/V8 bindings cheat sheet
@SiriusDely
SiriusDely / NginxRedirect.md
Created April 4, 2017 14:51 — forked from esfand/NginxRedirect.md
Nginx Redirect

Redirect: Temporary and Permanent

Source

What is an HTTP Redirect?

HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.

As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.

@SiriusDely
SiriusDely / react-native-gitignore
Created December 30, 2016 12:16 — forked from ryantbd/react-native-gitignore
react-native-gitignore
# Most part of this file is created by https://www.gitignore.io
### Node ###
# Logs
logs
*.log
# Runtime data
pids
*.pid
@SiriusDely
SiriusDely / genymotionwithplay.txt
Created December 13, 2016 08:23 — 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)
@SiriusDely
SiriusDely / demo-data.json
Last active December 11, 2016 06:42
Demo Data
[
{
"gender": "male",
"name": {
"title": "mr",
"first": "aiden",
"last": "lucas"
},
"location": {
"street": "1446 oak lawn ave",
@SiriusDely
SiriusDely / Git: for everyone of us.md
Last active October 31, 2016 06:33
Git: for everyone of us
  1. Git is a tool for modelling your code's history as a tree (which usually called repository).

  2. There are two ways to have a git repository on your local computer. First is to create your own from scratch (or from existing folder of code). Second is to clone an existing remote online repository that you have access to.

    command(s):
    git clone {url-of-remote-repo} {name-new-folder-for-git-to-create}
    git remote add upstream {url-of-master-repo-before-forked} (see point 3. below)
    or
    mkdir {your-new-project-folder-name}
    cd {your-new-project-folder-name}

@SiriusDely
SiriusDely / ios.gitignore
Created June 10, 2014 01:47
ios.gitignore
# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3