Skip to content

Instantly share code, notes, and snippets.

View Jarvl's full-sized avatar

Andrew Jarvis Jarvl

View GitHub Profile
@Jarvl
Jarvl / .vimrc
Last active September 17, 2021 16:08
vim config
set history=500
" Enable filetype plugins
filetype plugin on
filetype indent on
" Set to auto read when a file is changed from the outside
set autoread
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = " "
" highlights the current line
@Jarvl
Jarvl / switch_ssh
Last active February 2, 2017 21:29
Command line tool for switching ssh config and id_rsa files for git deployment with ssh keys
#!/bin/bash
# Usage: sudo switch_ssh "file-prefix"
# Example:
# Files "my-project-id_rsa", "my-project-config" exist in ~/.ssh
# "sudo switch_ssh my-project"
# "my-project-id_rsa" is copied to "id_rsa", "my-project-config" is copied to "config"
cd ~/.ssh
#!/usr/bin/env python
import flickrapi
import requests
import os
import re
FLICKR_KEY = "your api key"
FLICKR_SECRET = "your api secret"
USER_ID = "your user id"
@Jarvl
Jarvl / curl-test.php
Created February 18, 2016 22:13
curl test
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'https://lamproslabs.com',
CURLOPT_CONNECTTIMEOUT => 10
));
$data = curl_exec($curl);