Skip to content

Instantly share code, notes, and snippets.

Working from home

Tomas Salazar atomsfat

Working from home
View GitHub Profile
View darcula_sarayi.icls
<scheme name="Darcula sarayi" version="142" parent_scheme="Darcula">
<option name="FONT_SCALE" value="1.0" />
<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>
<option name="LINE_SPACING" value="1.0" />
atomsfat / Makefile
Last active Feb 12, 2020
Makefile to generate api-clients
View Makefile
# get Makefile directory name:
.DEFAULT_GOAL := client-generated
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
# client specific
atomsfat / fillform.js
Created Apr 24, 2017
View fillform.js
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '';
script.onload = function() {
console.log("------>", faker, $("input[name='email']"))
window.randomData = function() {
// console.log("random data");
faker.locale = 'es_MX';
atomsfat / simpleserver.js
Created Nov 22, 2016
Simple sever to debug header and url behind proxies
View simpleserver.js
var express = require('express');
var app = express();
app.get('/*', function (req, res) {
res.send('Hello World!');
app.listen(8090, function () {
CURL_FORMAT="URL: %{url_effective} ReturnCode: %{http_code}, TTFB: %{time_starttransfer}, Total time: %{time_total}, Download Size: %{size_download}"
TOTAL_URL=$(wc -l < $FILE_URL | xargs)
echo "1..$TOTAL_URL"
while read LINE
RES=$(curl -L -s -o /dev/null -w "$CURL_FORMAT" $LINE)
atomsfat / varnish.vcl
Created Aug 30, 2016
Mobile Device Detection via User Agent RegEx Varnish
View varnish.vcl
#Mobile detect
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";
set req.http.X-ua = "desktop";
sub vcl_hash {
hash_data(req.http.X-ua + ":" + req.url );
View gist:dc2ede8cbea2f397cd7f
View docker_acordeon.txt
boot2docker ip →Get lP
docker info
docker rm <name>
docker stop <name>
docker start <name>
docker attach <name>
docker ps -a
docker logs -f <name>
docker top <name>
docker inspect <name>
atomsfat / Ingreso Proyecto
Last active Aug 29, 2015
Proyecto GEX Developer SR
View Ingreso Proyecto
Construir una api REST, para hacer altas, bajas cambios de usuarios, documentar la API.
Utilizar las siguientes tecnologias.
* Spring Boot
* PostgreSQL hibernate o Gorm
* Gradle
atomsfat / concurrent
Created Apr 21, 2014
concurrent closuere
View concurrent
def concurrent(int count, Closure closure) {
def values = []
def futures = []
ExecutorService executor = Executors.newFixedThreadPool(count)
CyclicBarrier barrier = new CyclicBarrier(count)
for (int i = 0; i < count; i++) {
futures.add(executor.submit(new Callable() {
public def call() throws Exception {
You can’t perform that action at this time.