Skip to content

Instantly share code, notes, and snippets.

View EOM's full-sized avatar

Sergio N. EOM

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 18, 2024 10:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ecarlson94
ecarlson94 / README.md
Last active April 17, 2024 14:54
WSL Configuration

Installing WSL (windows subsystem for linux)

Running the azure-team terraform make file to create your infrastructure may not work on a Windows machine. If you cannot get it to run, install a linux distribution where you will exectute the tf files. Setting up a distribution with all of the right dependencies does involve a bit of setup to get it configured properly. The following is a list of steps you'll need to complete:

Install WSL

@dusta
dusta / Deploy_on_cPanel.md
Last active April 3, 2024 21:00 — forked from oodavid/README.md
Deploy your site with git on cPanel

Deploy your site with git on cPanel

The most important: You must have shell access!

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/
@dcatanzaro
dcatanzaro / botcito_galicia.js
Last active January 26, 2024 22:36
Botcito para el Galicia
const axios = require("axios");
let lastIndexMovement = 0;
const TELEGRAM_BOTID = "";
const TELEGRAM_CHATID = "";
class Telegram {
sendTelegramMessage(message) {
const botId = TELEGRAM_BOTID;
@cowboy
cowboy / github_post_recieve.php
Created October 11, 2010 02:04
GitHub PHP webhook to auto-pull on repo push
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' );
}
?>hi
@theorigin
theorigin / SQLServer-APIPost.sql
Last active January 9, 2024 12:10
SQL Server code to POST to an API
DECLARE @Object AS INT;
DECLARE @ResponseText AS VARCHAR(8000);
DECLARE @Body AS VARCHAR(8000) =
'{
"what": 1,
"ever": "you",
"need": "to send as the body"
}'
EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;
@mcnamee
mcnamee / bitbucket-pipelines.yml
Last active December 14, 2023 03:57
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add FTP_USERNAME, FTP_PASSWORD and FTP_HOST as environment variables.
# 2. Commit this file (bitbucket-pipelines.yml) to your repo (in the repo root dir)
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initialize GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (see 'Installation' above) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:deploy-all)
@EOM
EOM / cod_lenguaje_pais.sql
Created December 31, 2012 00:37
Tabla, con los Código ISO País, Lenguaje, I18N, para MySQL listo para utilizar en nuestros desarrollos. es_AR, es_BO, pl_BR, Etc.. Yo lo utilizo para vincular con la tabla con todos los IP del mundo que pertenece a cada pais. Mas info: http://www.ipligence.com/faq
/*
MySQL
Target Server Type : MYSQL
Target Server Version : 50022
File Encoding : 65001
Date: 2012-12-30 21:22:23
*/
@ZachJiroun
ZachJiroun / OrderAhead.py
Last active May 6, 2023 23:11
Clover V3 REST API Example
__author__ = 'zachj'
import requests
import json
merchantId = 'INSERT YOUR MERCHANT ID HERE'
token = 'INSERT YOUR API TOKEN HERE'
apiToken = '?access_token=' + token
baseURL = 'https://api.clover.com/v3/merchants/' + merchantId + '/'
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
@Linnk
Linnk / nginx_cakephp.dev.conf
Created September 2, 2015 18:44
NGINX configuration file for CakePHP projects with subdirectory
# NGINX Configuration for CakePHP projects with url subdirectories.
#
# In a classic-default-generic CakePHP project you can have as many
# independent applications as you want just by copying the app/
# directory. Apache and the .htaccess files will make the magic, but
# in a nginx server you will need a touch to your virtualhost conf.
#
# So, in order to make this:
#
# example.com/ —> ~/cakephp.dev/app/webroot/index.php