Skip to content

Instantly share code, notes, and snippets.

View ishuah's full-sized avatar
🔨
Build

Ishuah E Kariuki ishuah

🔨
Build
View GitHub Profile
package main
import (
"bufio"
"io"
"os"
"os/exec"
"time"
"fyne.io/fyne/v2"
package main
import (
"os"
"os/exec"
"time"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/layout"
package main
import (
"os"
"os/exec"
"time"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/layout"
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/widget"
)
func main() {
func (f *Fs) CleanUp() error {
err := f.pacer.Call(func() (bool, error) {
err := f.svc.Files.EmptyTrash().Do()
return shouldRetry(err)
})
if err != nil {
return err
}
return nil
@ishuah
ishuah / The Technical Interview Cheat Sheet.md
Created October 30, 2015 11:19 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@ishuah
ishuah / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ishuah
ishuah / screenshot_example.py
Created January 28, 2014 16:55
Python/Django - Take screenshots of pages that require authentication with Selenium
#this would be in your view.py
from pyvirtualdisplay import Display
from selenium import webdriver
def take_screenshot(request):
HOST = request.get_host()
display = Display(visible=0, size=(1920,1440))
display.start()
@ishuah
ishuah / models.py
Created November 4, 2013 19:56
How to implement https://github.com/kienluu/blobstore_storage in your django models
from django.db import models
from blobstore_storage.storage import BlobStoreStorage
class Image(models.Model):
image = models.ImageField(
storage=BlobStoreStorage(), upload_to='board_pics/', max_length=255)
def __unicode__(self):
index = self.image.name.find('/')
if index > -1: