Skip to content

Instantly share code, notes, and snippets.

View nyxee's full-sized avatar

Andrew Nyago nyxee

  • Kampala
  • 23:02 (UTC +03:00)
View GitHub Profile
anonymous
anonymous / -
Created August 22, 2017 04:13
System: Host: ny-h-u Kernel: 4.4.0-92-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.4.4 (Gtk 3.18.9-1ubuntu3.3) dm: gdm3 Distro: Ubuntu 16.04 xenial
Machine: System: HP product: HP ENVY Notebook v: Type1ProductConfigId Chassis: type: 10
Mobo: HP model: 80EE v: 87.51 Bios: Insyde v: F.35 date: 03/04/2016
CPU: Quad core Intel Core i7-6700HQ (-HT-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20735
clock speeds: min/max: 800/3500 MHz 1: 836 MHz 2: 899 MHz 3: 888 MHz 4: 899 MHz 5: 838 MHz
6: 808 MHz 7: 897 MHz 8: 900 MHz
Graphics: Card-1: Intel Skylake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:191b
Card-2: NVIDIA GM107M [GeForce GTX 950M] bus-ID: 01:00.0 chip-ID: 10de:139a
<style type="text/css">
body {
background:#fff;
color:#000;
font-family: Didot;
font-size:14px;
line-height:170%;
text-align: justify;
counter-reset: chapter; // FDM 130718 - Essential declaration of 'chapter' for nested counters H1 to H6 to work
}
@JakeWharton
JakeWharton / README.md
Last active May 10, 2018 08:39
A workaround for Android "L" Okio packaging problem. Place all of the following in a `libs/` folder.

JarJar'd OkHttp Dependencies

Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.

For more information see square/okhttp#967

Usage

@joshbode
joshbode / numbered_headings.md
Last active April 3, 2020 07:46
Numbered Headings in Markdown via CSS

World

Country

State

City

Suburb
Street
<style type="text/css"> body { margin: auto;
@JakeWharton
JakeWharton / ContractFragment.java
Created May 6, 2012 09:12
Base fragment to ensure the parent activity implements a contract interface.
/* Base fragment to ensure the parent activity implements a contract interface. */
public abstract class ContractFragment<T> extends Fragment {
private T mContract;
@Override
public void onAttach(Activity activity) {
try {
mContract = (T)activity;
} catch (ClassCastException e) {
throw new IllegalStateException(activity.getClass().getSimpleName()
@sohooo
sohooo / atp_calendar.rb
Created April 8, 2009 15:18
retrieve tournament info from ATP homepage to create ical
#!/usr/bin/env ruby
require 'rubygems'
require 'hpricot'
require 'icalendar'
require 'date'
class ATPCalendar
def initialize(source)
@source = source
@voyeg3r
voyeg3r / apt-fast.sh
Created May 20, 2010 12:54
apt-fast script
#!/bin/sh
# !/bin/sh
# apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source
# if you do anything cool with it, let me know so I can publish or host it for you
# contact me at admin@mattparnell.com
# Special thanks to Travis/travisn000 from the PCLinux Forums for making improvements that allow
# for more complex apt-get commands. See the thread: http://www.pclinuxos.com/forum/index.php/topic,66385.0.html
# Use this just like apt-get for faster package downloading. Make sure to have axel installed.
@stinger
stinger / Swift3DataTaskDelegate.swift
Last active March 25, 2023 22:12
Swift 3: URLSessionDelegate
//: # Swift 3: URLSessionDelegate
//: The following example shows how to use `OperationQueue` to queue the network requests. This is useful in many ways (for delaying queued requests when the networking goes down for example)
import Foundation
import PlaygroundSupport
class Requester:NSObject {
let opQueue = OperationQueue()
var response:URLResponse?
@edwardmp
edwardmp / gist:a0ffb3ace02ce4392b26
Created June 13, 2015 15:58
Working example of accepting self-signed SSL certificate in Swift
import UIKit
import Foundation
class ViewController: UIViewController, NSURLSessionDelegate {
override func viewDidLoad() {
super.viewDidLoad()
httpGet(NSMutableURLRequest(URL: NSURL(string: "https://example.com")!))
}
@stevenworthington
stevenworthington / ipak.R
Created July 25, 2012 19:44
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}