Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Dviejo Dviejopomata

💭
I may be slow to respond.
  • Alicante, Spain
View GitHub Profile
@timatooth
timatooth / main.go
Created Feb 9, 2018
watch, build, helm deploy
View main.go
package main
import (
"archive/tar"
"bytes"
"context"
"fmt"
"io"
"log"
"os"
@sputnick-dev
sputnick-dev / retrieveCssOrXpathSelectorFromTextOrNode.js
Created Apr 1, 2018
retrieve CSS or Xpath selector from text or HTML node
View retrieveCssOrXpathSelectorFromTextOrNode.js
// ==UserScript==
// @name retrieveCssOrXpathSelectorFromTextOrNode
// @namespace gilles<dot>quenot<at>sputnick<dot>fr
// @version 0.2
// @description retrieve CSS or Xpath Selector from text or node for chrome dev tools
// @author Gilles Quenot
// @include https://*
// @include http://*
// @include file://*
// @exclude https://mail.google.com/*
@ljaraque
ljaraque / tensorflow-gpu-ubuntu.md
Last active Apr 20, 2020
Install tensorflow-gpu in ubuntu
View tensorflow-gpu-ubuntu.md

Install tensorflow-gpu1.8 in ubuntu18.04 with CUDA9.2, cuDNN7.2.1 and NVIDIA Driver 396

ljaraque@yahoo.com

Overview

This is a summary of the process I lived in order to enable my system with CUDA9.2, cuDNN7.2.1, Tensorflow1.8 and NVIDIA GEFORCE GTX860M GPU. You can just skip the steps marked with FAILED. I decided to keep them there in order to be useful for others who tried those paths too.

FAILED (Next section is successfull) Install NVIDIA driver (FAILED, THIS WILL INSTALL DRIVER 390 which is not compatible with CUDA9.2):

ubuntu-drivers devices
@fernandohu
fernandohu / Reading configuration files before application startup in Angular2 final release.md
Last active Jun 18, 2020
Reading configuration files before application startup in Angular2 final release
View Reading configuration files before application startup in Angular2 final release.md

Reading data before application startup in Angular 2

In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.

This is how the demonstration will load data:

a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';

b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.

@mustafaakin
mustafaakin / README.md
Last active Aug 17, 2020
Running Windows Server 2k16 with Docker under Linux, KVM or Virtualbox
View README.md

Are you let down when you saw there is no guide to use Windows Server 2016 under *nix environments? I really loved Microsoft when I heard they are working on Windows containers, but when this week has arrived, it was sad to see that installation requirements were Windows and HyperV. But actually it is not. You just have to modify the VHD file a bit with nicer tools and execute the already available script in the downloaded VM. I will assume you are running a decent version of Linux and accepted EULA and all the legal stuff that I do not care.

1. Getting the required tools:

$ sudo apt-get install qemu-kvm virt-manager // or virtualbox, but we need qemu-kvm for image manipulation
$ sudo apt-get install qemu-utils libguestfs-tools // image manipulation tools

2. Downloading files

View add-alpine-js-to-tailwind-ui.js
// ==UserScript==
// @name Add Alpine.js to Tailwind UI
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add Alpine.js code to Tailwind Ui copy/paste
// @author https://github.com/KevinBatdorf
// @match https://tailwindui.com/components/*
// @grant none
// ==/UserScript==
const code = document.querySelectorAll('[x-ref=clipboardCode]')
@alojzije
alojzije / connectHTMLelements_SVG.png
Last active Oct 4, 2020
Connect two elements / draw a path between two elements with SVG path (using jQuery)
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created Oct 9, 2012
Clone all repos from a GitHub organization
View clone-all-twitter-github-repos.sh
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@btroncone
btroncone / rxjs_operators_by_example.md
Last active Oct 20, 2020
RxJS 5 Operators By Example
View rxjs_operators_by_example.md
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active Oct 20, 2020
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

You can’t perform that action at this time.