Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Alexander J. Rodriguez D. AlexR1712

🏠
Working from home
Block or report user

Report or block AlexR1712

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View curl.php
<?php
$ch = curl_init();
$fields =
http_build_query(
[
'dato1' => 2016,
'dato2' => 2017
]
@AlexR1712
AlexR1712 / nginx.conf
Created Aug 7, 2016 — forked from o-shabashov/nginx.conf
Nginx 1.10.* + LetsEncrypt SSL (A+) + HTTP/2 + PHP7-FPM + Force HTTPS sample config
View nginx.conf
server {
listen 80;
server_name domain.com;
root /var/www/domain.com;
location ~ /.well-known {
allow all;
}
location ~ /\.ht {
@AlexR1712
AlexR1712 / file.io.upload.php
Created Sep 1, 2016
File.io PHP File Upload up to 5GB
View file.io.upload.php
<?php
// Use composer
// composer require guzzlehttp/guzzle:~6.0
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
@AlexR1712
AlexR1712 / head.nodes.js
Created Oct 5, 2016
Nodos en el Head HTML
View head.nodes.js
document.head.childNodes
@AlexR1712
AlexR1712 / gotoxy.c
Created Oct 28, 2016
Gotoxy in native C
View gotoxy.c
#include<stdio.h>
//gotoxy function
void gotoxy(int x,int y)
{
printf("%c[%d;%df",0x1B,y,x);
}
main ()
{
gotoxy(25,50); //reposition cursor
printf("hello world"); //display text
@AlexR1712
AlexR1712 / README.md
Created Jan 20, 2017 — forked from oodavid/README.md
Deploy your site with git
View README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
    • apache's home directory is /var/www/
View quotes.php
<?php
function get_http_response_code($url)
{
$headers = get_headers($url);
return substr($headers[0], 9, 3);
}
function getQuotes($page="")
{
try {
View zero-downtime.sh
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/weather-deploy" ]; then
rm -R /home/forge/weather-deploy
fi
if [ -d "/home/forge/weather-backup" ]; then
rm -R /home/forge/weather-backup
fi
View zero-to-microservice-with-now.md

From zero to microservice with 𝚫 now

The following guide will show you how to deploy a simple microservice written in JavaScript using 𝚫 now.

It uses Open Source tools that are widely available, tested and understood:

  • Node.JS
  • NPM
  • Express
@AlexR1712
AlexR1712 / bash.md
Last active Apr 7, 2017
Comandos Utiles Terminal
View bash.md

Contar Archivos en un Directorio

ls -F | grep -v / | wc -l

Mostrar ultimas 20 lines de un archivo

tail -20 bigfile.txt
You can’t perform that action at this time.