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 | |
pip install "$1" & | |
easyinstall "$1" & | |
brew install "$1" & | |
npm install "$1" & | |
yum install "$1" & dnf instal "$1" & | |
docker run "$1" & | |
pkg install "$1" & | |
apt-get install "$1" & |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"net/url" | |
//"time" | |
"crypto/aes" |
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 | |
# rationale: Interfaz eth1 de vagrant no auto inicia | |
# link: https://glud.org/2017/01/09/interfaz-eth1-de-vagrant-no-auto-inicia/ | |
sudo tee /usr/local/bin/ifupeth1.sh << 'EOF' | |
#!/bin/bash | |
sleep 10 && ifup eth1 | |
EOF | |
sudo chmod +x /usr/local/bin/ifupeth1.sh | |
sudo tee /usr/lib/systemd/system/ifupeth1.service << 'EOF' | |
[Unit] |
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
var iconFeature = new ol.Feature({ | |
geometry: new ol.geom.Point([0, 0]), | |
name: 'Null Island', | |
population: 4000, | |
rainfall: 500 | |
}); | |
var iconFeature2 = new ol.Feature({ | |
geometry: new ol.geom.Point([-1000000, -1000000]), | |
name: 'Island 2', |
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
const int ledPin = 13; | |
const int botonPin = 7; | |
const int boton2Pin = 8; | |
int milisegundos = 500; | |
int val = 0; | |
long randNumber; | |
long randNumber2; | |
void setup() { | |
Serial.begin(9600); |
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 -eux | |
curl -H "Content-Type: application/json" \ | |
-H "X-Gogs-Delivery: 4340a65c-9526-4473-8f07-064dab3ca021" \ | |
-H "X-Gogs-Event: push" -X POST \ | |
-d '{"secret":"ABCD123","ref":"refs/heads/master","before":"bbbbbbb","after":"aaaaaaaaaaaaa","compare_url":"https://gogs.example.com/organization/repository/compare/aaaaaaaaaa...bbbbbbbb","commits":[{"id":"aaaaaa","message":"hi","url":"https://gogs.udistritaloas.edu.co/core/udistrital_core_db/commit/aaaaaaaa","author":{"name":"juusechec","email":"hi","username":""},"committer":{"name":"j","email":"hi@hid","username":""},"timestamp":"2017-05-31T16:52:27Z"},{"id":"aaaaa","message":"COMMITn","url":"https://gogs.domain.net/hola/hi/commit/aaaa","author":{"name":"aaaa","email":"[email protected]","username":"aaaa"},"committer":{"name":"aaa","email":"[email protected]","username":"aaa"},"timestamp":"2017-05-30T21:02:31Z"}],"repository":{"id":1,"name":"repo","url":"https://gogs.example.com/org/repo","ssh_url":"ssh://[email protected]:22/org/repo.git","clone_url": |
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
package co.edu.udistrital.glud.services; | |
import javax.crypto.spec.SecretKeySpec; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.Cipher; | |
import java.util.Base64; | |
import java.util.Random; |
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
from qgis.utils import iface | |
#iface.activeLayer().id() | |
# https://gis.stackexchange.com/questions/91011/how-to-select-and-zoom-in-features-from-a-qgis-python-plugin | |
layer = iface.mapCanvas().layers()[0] | |
#layer = QgsProject.instance().mapLayer('waterways20171005162048981') | |
filter='"osm_id"=' + str([%osm_id%]) | |
r = QgsFeatureRequest().setFilterExpression(filter) | |
features = layer.getFeatures(r) |
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
# Python Console env | |
# Get current Layer https://github.com/wfpinedar/typeCapa/blob/master/tipedata.py | |
layer = iface.activeLayer() | |
# Name of current layer | |
layer_name = iface.activeLayer().name() | |
# Uri of resource layer | |
iface.activeLayer().dataProvider().dataSourceUri() | |
# Display Expression of Layer | |
iface.activeLayer().displayExpression() |
OlderNewer