Skip to content

Instantly share code, notes, and snippets.

View aleksik's full-sized avatar

Aleksi Kaistinen aleksik

View GitHub Profile

Keybase proof

I hereby claim:

  • I am aleksik on github.
  • I am aleksik (https://keybase.io/aleksik) on keybase.
  • I have a public key ASD8_aKAGMJGHzWrMSdCsfZzTN-pOrE8CHH2kjKH2U72two

To claim this, I am signing this object:

@aleksik
aleksik / getUsers.js
Created February 8, 2018 17:06
jest mock node-fetch
const fetch = require('node-fetch')
const getUsers = () => fetch('https://reqres.in/api/users')
.then(res => res.json())
module.exports = getUsers
@aleksik
aleksik / wget.txt
Created November 22, 2017 12:38 — forked from iAugur/wget.txt
wget spider cache warmer
wget --spider -o wget.log -e robots=off -r -l 5 -p -S -T3 --header="X-Bypass-Cache: 1" -H --domains=live-mysite.mydomain.com --show-progress live-mysite.mydomain.com
# Options explained
# --spider: Crawl the site
# -o wget.log: Keep the log
# -e robots=off: Ignore robots.txt
# -r: specify recursive download
# -l 5: Depth to search. I.e 1 means 'crawl the homepages'.  2 means 'crawl the homepage and all pages it links to'...
# -p: get all images, etc. needed to display HTML page
# -S: print server response (to the log)
@aleksik
aleksik / App.jsx
Last active July 26, 2017 10:38
React native image upload
import React from 'react';
import { Button, Image, View, StyleSheet} from 'react-native';
import { ImagePicker } from 'expo';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
image: null
@aleksik
aleksik / untitled
Created October 21, 2014 09:27
acrylic conf
;
; IF YOU MAKE ANY CHANGES TO THIS FILE YOU HAVE TO RESTART THE ACRYLIC DNS
; PROXY SERVICE IN ORDER TO SEE THEIR EFFECTS.
;
[GlobalSection]
;
; The cluster of host names the primary DNS server is to resolve.
;
; The affinity mask is a list of semicolon separated values or wildcards that
; allows to restrict which DNS server is going to resolve a particular host name.