This file contains 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
/* * | |
* Arduino Telnet Server * | |
* 7 July 2010 * | |
* Basic Arduino I/O via * | |
* a command line interface * | |
* by Steve Lentz * | |
* stlentz[at]gmail[dot]com * | |
Quick Start Instructions: | |
1) Set Ethernet address in code below. |
This file contains 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
<scheme name="Darcula sarayi" version="142" parent_scheme="Darcula"> | |
<option name="FONT_SCALE" value="1.0" /> | |
<metaInfo> | |
<property name="created">2020-06-24T10:10:21</property> | |
<property name="ide">idea</property> | |
<property name="ideVersion">2019.3.0.0</property> | |
<property name="modified">2020-06-24T10:10:28</property> | |
<property name="originalScheme">Darcula sarayi</property> | |
</metaInfo> | |
<option name="LINE_SPACING" value="1.0" /> |
This file contains 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
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 | |
.DEFAULT_GOAL := client-generated | |
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) | |
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) | |
ONLINE_GEN_URL=https://generator3.swagger.io/api/generate | |
# client specific | |
LANG:=javascript | |
CODE_GEN_VERSION=V3 | |
API_DOC_URL:=http://localhost:8000/openapi.json |
This file contains 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
/* Script to upload files to S3. | |
* @author Tomas Salazar | |
*/ | |
@GrabResolver(name='jets3t', root='http://www.jets3t.org/maven2', m2Compatible='true') | |
@Grab(group='net.java.dev.jets3t', module='jets3t', version='0.9.0') | |
import org.jets3t.service.impl.rest.httpclient.RestS3Service | |
import org.jets3t.service.security.AWSCredentials | |
import org.jets3t.service.model.* | |
accessKey = 'Cambiar' |
This file contains 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
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_25/bin/java" 2 | |
sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_25/bin/java | |
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_25/bin/javac" 2 | |
sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_25/bin/javac | |
/usr/lib/mozilla/plugins | |
sudo ln -s /opt/java/jdk1.7.0_25/jre/lib/i386/libnpjp2.so | |
sudo ln -s /opt/java/jdk1.7.0_25/jre/lib/amd64/libnpjp2.so |
This file contains 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 head = document.getElementsByTagName('head')[0]; | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = 'https://cdn.rawgit.com/Marak/faker.js/master/examples/browser/js/faker.js'; | |
script.onload = function() { | |
console.log("------>", faker, $("input[name='email']")) | |
window.randomData = function() { | |
// console.log("random data"); | |
faker.locale = 'es_MX'; |
This file contains 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 express = require('express'); | |
var app = express(); | |
app.get('/*', function (req, res) { | |
console.log(req.originalUrl) | |
console.log(req.headers) | |
res.send('Hello World!'); | |
}); | |
app.listen(8090, function () { |
This file contains 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 | |
CURL_FORMAT="URL: %{url_effective} ReturnCode: %{http_code}, TTFB: %{time_starttransfer}, Total time: %{time_total}, Download Size: %{size_download}" | |
FILE_URL=$1 | |
TOTAL_URL=$(wc -l < $FILE_URL | xargs) | |
COUNTER=1 | |
echo "1..$TOTAL_URL" | |
while read LINE | |
do | |
RES=$(curl -L -s -o /dev/null -w "$CURL_FORMAT" $LINE) |
This file contains 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
#Mobile detect https://gist.github.com/dalethedeveloper/1503252 | |
if(req.http.User-Agent ~ ".*(Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune).*") | |
{ | |
set req.http.X-ua = "mobile"; | |
}else{ | |
set req.http.X-ua = "desktop"; | |
} | |
sub vcl_hash { | |
hash_data(req.http.X-ua + ":" + req.url ); |
This file contains 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
class BootStrap { | |
def grailsApplication | |
grailsApplication.getArtefacts("Domain").each{dc-> | |
//here we register custom marshallers declared in domain classes | |
if(dc.hasProperty("marshaller")){ | |
dc.clazz.marshaller() | |
} | |
} |
NewerOlder