Skip to content

Instantly share code, notes, and snippets.

View edusis's full-sized avatar

Edwar edusis

  • Sinapsis
  • Lima, Perú
View GitHub Profile
@edusis
edusis / jenkins_high_availability.md
Created June 20, 2018 23:22 — forked from samrocketman/jenkins_high_availability.md
Researching on Jenkins in a high availability configuration.
@edusis
edusis / cntlm_npm.md
Last active May 18, 2018 04:37 — forked from triskell/cntlm_npm.md
[Windows 7] CNTLM and NPM behind NTLM proxy

CNTLM and NPM behind NTLM proxy on Windows 7

CNTLM

  • Install CNTLM in a folder where you have full rights to run it as administrator.

  • Open cntlm.ini and fill it :

Username    YOUR_USERNAME
Domain YOUR_DOMAIN
  • Maintain a single source repository - Use a decent source code management system and make sure its location is well known as the place where everyone can go to get source code. Also ensure that everything is put into the repository (test scripts, database schema, third party libraries etc.)
  • Automate the build - Make sure you can build and launch your system using MSBuild/NAnt scripts in a single command. Include everything into your build. As a simple rule of thumb: anyone should be able to bring in a clean machine, check the sources out of the repository and issue a single command to have a running system on their machine.
  • Make your build self-testing - Include automated tests in your build process.
  • Everyone commits every day - "A commit a day keeps the integration woes away" [Duvall]. Frequent commits encourage developers to break down their work into small chunks of a few hours each. Before committing their code, they need to update their working copy with the mainline, resolve any conflicts and en
@edusis
edusis / git commands.txt
Created May 22, 2017 03:01 — forked from kmorcinek/git commands.txt
Git Commands. My common scenarios for using git.
# good git book
http://git-scm.com/book
# Discard uncommitted changes in a specific file
git checkout file_name
# Clear everything not in repo
git checkout -- .
# A way to quickly move to the previous commit in a git branch. This also way for "deleting" last commit.
//https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html
git config --global user.name "Sam Smith"
git config --global user.email sam@example.com
git init
git clone /path/to/repository
git clone username@host:/path/to/repository
git add <filename>
git add *
@edusis
edusis / resource_alloc_docker.md
Created February 16, 2017 19:45 — forked from afolarin/resource_alloc_docker.md
Resource Allocation in Docker

#Container Resource Allocation Options in docker-run You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.

##Dynamic CPU Allocation -c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)

##Reserved CPU Allocation

@edusis
edusis / intercept-https-with-python-mitmproxy.md
Created October 28, 2016 18:37 — forked from dannvix/intercept-https-with-python-mitmproxy.md
Intercept and manipulate HTTPs traffic with Python and mitmproxy

Intercepts HTTPs Traffic with Python & mitmproxy

Warning

This Gist is created in 2014, and it's highliy outdated now, according to one of mitmproxy's manjor contributor (check his comment below). Thanks for letting us know, @mhils!

Introduction

Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.

@edusis
edusis / tweetclass.py
Created February 16, 2016 23:12 — forked from m1m0r1/tweetclass.py
Text classification using Twitter, MeCab, TokyoCabinet and nltk.
#!/usr/bin/env python2.6
# coding: utf-8
# Twitter
import twitter
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_TOKEN_KEY = ''
ACCESS_TOKEN_SECRET = ''
@edusis
edusis / whatsapp.html
Created October 29, 2015 23:06 — forked from MarcoDeJong/whatsapp.html
Whatsapp share link (or button)
<html>
<head>
<meta name='viewport' content='width=device-width, user-scalable=yes'>
</head>
<body>
<h1>Whatsapp share link</h1>
<p>This will currently only work on an iPhone</p>
<script>
@edusis
edusis / web2png.py
Created October 4, 2015 07:02 — forked from PierrickKoch/web2png.py
Takes snapshot of full webpages using Webkit and Qt4
#!/usr/bin/env python
"""
Takes snapshot of full webpages using Webkit and Qt4
usage:
python web2png.py URL [FILE]
example:
python web2png.py http://python.org out.png
see:
http://riverbankcomputing.com/static/Docs/PyQt4/html/qwebview.html#load