Skip to content

Instantly share code, notes, and snippets.

View daffodilistic's full-sized avatar

T. H. Soh daffodilistic

View GitHub Profile
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@jonswaff
jonswaff / timeIntervalToStringWithInterval
Created July 27, 2012 02:23
Convert a NSTimeInterval into a human-readable string. Used to convert EKAlerts to text
+ (NSString *)timeIntervalToStringWithInterval:(NSTimeInterval)interval
{
NSString *retVal = @"At time of event";
if (interval == 0) return retVal;
int second = 1;
int minute = second*60;
int hour = minute*60;
int day = hour*24;
// interval can be before (negative) or after (positive)
@karl-
karl- / CleanUpWindow.cs
Created November 15, 2012 03:25
New interface for removing unused Unity assets
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections;
using System.Collections.Generic;
public class CleanUpWindow : EditorWindow
{
bool groupEnabled = true;
List<string> usedAssets = new List<string>();
@glombard
glombard / new_obj.py
Created December 9, 2014 19:57
Python anonymous object
# Sometimes it's handy to create small anonymous objects instead of explicitly defining a class for it, especially while prototyping.
def new(name, data):
return type(name, (object,), data)
person = new('Person', { 'name': 'Joe', 'age': 30 })
print(person.name)
@RichardBronosky
RichardBronosky / pep8_cheatsheet.py
Created December 27, 2015 06:25
PEP-8 cheatsheet
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py
@NathanGiesbrecht
NathanGiesbrecht / noip2.service
Last active June 26, 2024 15:32
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl daemon-reload`
# 5) Execute `sudo systemctl enable noip2`
# 6) Execute `sudo systemctl start noip2`
@wavezhang
wavezhang / java_download.sh
Last active July 6, 2024 18:07
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@bsakhanov
bsakhanov / index.html
Created January 19, 2019 14:44
Uikit3 on hover flip card
<div class="uk-section">
<div class="uk-container">
<div class="uk-grid uk-child-width-1-4@m uk-child-width-1-2@s uk-grid-match uk-grid-small" uk-grid>
<div class="card-flip">
<div class="uk-card uk-card-default uk-card-small uk-card-hover card">
<a href="#" class="uk-position-cover"></a>
<div class="front uk-background-cover uk-height-medium uk-panel uk-flex uk-flex-center uk-flex-middle" style="background-image: url(https://getuikit.com/docs/images/light.jpg);">
<p class="uk-h4">Front</p>
</div>
<div class="back card-face uk-background-cover uk-height-medium uk-panel uk-flex uk-flex-center uk-flex-middle" style="background-image: url(https://getuikit.com/docs/images/dark.jpg);">
@favoyang
favoyang / BuildAddressables.cs
Last active June 7, 2024 18:10
Build addressable bundles when clicking the build button
/// <summary>
/// The script gives you choice to whether to build addressable bundles when clicking the build button.
/// For custom build script, call PreExport method yourself.
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command.
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/
///
/// License: The MIT License https://opensource.org/licenses/MIT
/// </summary>
using UnityEditor;
using UnityEditor.AddressableAssets;
@peteristhegreat
peteristhegreat / Readme.md
Last active June 6, 2024 14:38
Realtek bluetooth usb adapter RTL8671b