This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.tooltip').tooltipster({ | |
| functionBefore: function(origin, continueTooltip){ | |
| continueTooltip(); | |
| var color = origin.data('color'); | |
| if(!color){ return false; } | |
| $('.tooltipster-default').css({ | |
| 'background-color': color | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Assuming that you have "Google Play Services" configured | |
| //protected LocationClient mLocationClient; | |
| //mLocationClient = new LocationClient(this, this, this); | |
| // protected Location mLocation; | |
| float DISTANCE = 0.2; | |
| mLocation = mLocationClient.getLastLocation(); | |
| ParseQuery<ParseObject> places = ParseQuery.getQuery("AParseClass"); | |
| Log.i(LOG_TAG, mLocation.toString()); | |
| places.whereWithinKilometers("location", new ParseGeoPoint(mLocation.getLatitude(), mLocation.getLongitude()), DISTANCE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Obtener promedio general de la carrera. Kardex - Institupo Politecnico Nacional | |
| $(function(){ | |
| var kardex = {} | |
| var container = $('#ctl00_mainCopy_Panel1'); | |
| var tables = container.find('table'); | |
| tables.each(function(i, table){ | |
| // console.log('table', el); | |
| var tbody = $(table).find('tbody'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Se modificó para importar desde un archivo | |
| from archivo import haz_algo as ha | |
| def haz_algo(): | |
| return 'desde haz algo' | |
| print 'Suma algo: ' | |
| print haz_algo | |
| print ha(4, 5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: devf/Sensei.java | |
| package devf; | |
| import java.util.HashMap; | |
| public class Sensei{ | |
| private String type, firstName, lastName; | |
| private static HashMap<String, Double> types; | |
| private static double taxPercentage = 0.16; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; supervisor config file | |
| [inet_http_server] | |
| port=127.0.0.1:9001 | |
| [supervisord] | |
| logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) | |
| pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | |
| childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| NAME="project_name" | |
| DJANGODIR="/path/to/django_project" | |
| VIRTUAL_ENV_DIR="/path/to/virtualenv/folder" | |
| VIRTUAL_ENV_FILE=${DJANGODIR}/.env | |
| # SOCKFILE= | |
| ADDRESS=0.0.0.0:8000 | |
| USER=sysuser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user nginx; | |
| worker_processes 4; | |
| pid /run/nginx.pid; | |
| events { | |
| worker_connections 768; | |
| } | |
| http { | |
| sendfile on; | |
| tcp_nopush on; | |
| tcp_nodelay on; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream backend_staging { | |
| server SOME_IP:PORT weight=5 max_fails=3 fail_timeout=30s; | |
| } | |
| server { | |
| listen 80; | |
| server_name www.domain.com; | |
| return 301 http://$server_name$request_uri; | |
| } | |
| server { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Used with Invoke to automate tasks | |
| Connect to a given hostname in a given SSH config file | |
| Inpired by: https://gist.github.com/acdha/6064215 | |
| """ | |
| from invoke import task, run | |
| from paramiko import SSHConfig, SSHClient, SSHException, AutoAddPolicy | |
| import logging |
OlderNewer