Skip to content

Instantly share code, notes, and snippets.

traceroute google.com (04-03 13:12)
traceroute to google.com (216.58.216.206), 64 hops max, 52 byte packets
1 * 192.168.1.1 (192.168.1.1) 1.050 ms 0.850 ms
2 cpe-76-178-144-1.natnow.res.rr.com (76.178.144.1) 30.210 ms 23.194 ms 21.345 ms
3 tge7-1.plmnwaen02h.natnow.rr.com (65.28.215.5) 7.730 ms 10.163 ms 15.980 ms
4 tge1-2.cralidfs01r.natnow.rr.com (72.129.43.26) 11.982 ms 13.065 ms 12.956 ms
5 tge0-4-0-0.sttlwawb02r.natnow.rr.com (72.129.43.108) 20.304 ms 18.294 ms 19.261 ms
6 bu-ether15.sttswa5801w-bcr01.tbone.rr.com (107.14.19.114) 18.799 ms 19.341 ms 23.936 ms
7 0.ae1.pr0.sea20.tbone.rr.com (66.109.6.149) 18.851 ms 17.718 ms 21.183 ms
8 * * *
@rnewman
rnewman / gist:541a558f143cc64d232f
Last active August 29, 2015 14:18
Swift 1.2 compiler stacktrace
This is the code in question:
---
public func stringArrayForKey(defaultName: String) -> [String]? {
if let arr = self.arrayForKey(defaultName) as? [String]? {
return arr
}
return nil
}
@rnewman
rnewman / gist:c16b434f00b13908969a
Created April 9, 2015 18:02
Write-triggered sync
04-07 18:10:21.811 I/FxAccounts(25580): fennec_rnewman :: FxAccountSyncAdapter :: Syncing FxAccount account named like [email protected] for authority org.mozilla.fennec_rnewman.db.browser with instance org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter@206b828d.
04-07 18:10:21.816 I/FxAccounts(25580): fennec_rnewman :: FxAccountSyncAdapter :: Account last synced at: 1428455345700
04-07 18:10:21.817 I/FxAccounts(25580): fennec_rnewman :: FirefoxAccounts :: Sync hints; scheduling now: false; ignoring local rate limit: true; ignoring remote server backoff: true.
04-07 18:10:21.823 I/FxAccounts(25580): fennec_rnewman :: FxAccountSyncAdapter :: Not syncing (rate): must wait another 9924ms.
04-07 18:10:21.823 D/GeckoLogger(25580): Thread with tag and thread id releasing lock: null, 441 ...
04-07 18:10:21.823 D/GeckoLogger(25580): Thread with tag and thread id releasing lock: null, 441 ... NOT LOCKED
04-07 18:10:21.841 D/SyncManager( 449): failed sync operation [email protected] u0 (org.mozilla.fenn
run(_:sql:): Error runningC oulSdn'Qt cLrea te ior nu pdaBtre BoRwOWsSeErR.Ta
bleA.tte mpOtpitngi too mnoavle browse(r".dbA tboo ranott hderu loecat iotno.
XXX init 0x00007f9fdcabebf0
XXX deinit 0x00007f9fdcabebf0
XXX init 0x00007f9fda4ef990
XXX deinit 0x00007f9fda4ef990
XXX init 0x00007f9fdc9bb330
XXX deinit 0x00007f9fdc9bb330
XXX init 0x00007f9fdca59890
XXX deinit 0x00007f9fdca59890
XXX init 0x00007f9fda6739e0
XXX deinit 0x00007f9fda6739e0
Visit on Mon Apr 27 02:08:20 PDT 2015
sqlite> select (3 * MAX(1, 100 * 225 / (((1431125701897 - 1430125700000) / 86400000) * ((1430125701897 - 1431125700000) / 86400000) + 225))) as bar from none;
bar
----------
648
sqlite> select (3 * MAX(1, 100 * 225 / (((1431125701897 - 1430125700000) / 86400000.0) * ((1430125701897 - 1431125700000) / 86400000.0) + 225))) as bar from none;
bar
----------------
741.425746299869
@rnewman
rnewman / gist:3cdc11a8f5dfd506664f
Last active August 29, 2015 14:21
History sync schema
Things we need to be able to do:
* Record visits for places that are already synced, distinguishing local and
remote visits for top sites, but able to merge them to upload a remote record.
* Record visits for new places that haven't been synced down.
* Merge locally created places with incoming places.
* View places that have only been visited remotely.
* Handle deletions of individual visits. (E.g., clear recent history.)
* Handle deletions of entire places.
- It's not clear exactly what this entails. If one deletes every visit
diff --git a/mobile/android/base/background/common/GlobalConstants.java b/mobile/android/base/background/common/GlobalConstants.java
--- a/mobile/android/base/background/common/GlobalConstants.java
+++ b/mobile/android/base/background/common/GlobalConstants.java
@@ -42,16 +42,22 @@ public class GlobalConstants {
* no SSLv3 or TLSv1.0 (if we can), no DHE ciphers that might be vulnerable to Logjam
* (https://weakdh.org/), no RC4.
*
* Backstory: Bug 717691 (we no longer support Android 2.2, so the name
* workaround is unnecessary), Bug 1081953, Bug 1061273, Bug 1166839.
*
$ ./mach gradle-install (06-04 18:06)
0:00.79 /Users/rnewman/moz/hg/fx-team/objdir-droid/_virtualenv/bin/python /Users/rnewman/moz/hg/fx-team/python/mozbuild/mozbuild/action/process_install_manifest.py --no-remove --no-remove-all-directory-symlinks --no-remove-empty-directories /Users/rnewman/moz/hg/fx-team/objdir-droid/mobile/android/gradle /Users/rnewman/moz/hg/fx-team/objdir-droid/mobile/android/gradle.manifest
Traceback (most recent call last):
File "/Users/rnewman/moz/hg/fx-team/python/mozbuild/mozbuild/action/process_install_manifest.py", line 60, in <module>
main(sys.argv[1:])
File "/Users/rnewman/moz/hg/fx-team/python/mozbuild/mozbuild/action/process_install_manifest.py", line 51, in main
remove_empty_directories=not args.no_remove_empty_directories)
File "/Users/rnewman/moz/hg/fx-team/python/mozbuild/mozbuild/action/process_install_manifest.py", line 30, in process_manifest
remove_empty_directories=remove_empty_directorie
import UIKit
class Foo {
let xx: Int
required init(x: Int) { // Remove 'required' to see the factory fail.
self.xx = x
}
}
class Bar: Foo {