Skip to content

Instantly share code, notes, and snippets.

@ghoti143
ghoti143 / goog_dood.js
Created June 9, 2011 20:05
google guitar doodle unpacked
(function () {
var g = null,
h;
try {
if (!google.doodle) google.doodle = {};
var j, m, o, p, r, s, aa, t, u, ba, v, ca, da, ea = navigator.userAgent.indexOf("MSIE") >= 0,
fa = [
[3, "#776a62", "#2063ff", 2, [
[28, 23],
[103, 23]
@ghoti143
ghoti143 / ArrowButtonSkin.mxml
Created October 3, 2011 14:57
spark Arrow button
<?xml version="1.0" encoding="utf-8"?>
<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<!-- host component -->
<fx:Metadata>
<![CDATA[
[HostComponent("spark.components.ButtonBarButton")]
]]>
</fx:Metadata>
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin
minHeight="32"
minWidth="25"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/halo"
xmlns:s="library://ns.adobe.com/flex/spark"
alpha.disabled="0.5">
<fx:Metadata>
if (hr < 1 && min < 1)
{
result = "";
}
else if (hr < 1 && min < 2)
{
result = min + " minute";
}
else if (hr < 1)
{
private function formatTime(time:Number):String
{
var result:String;
var hr:Number = Math.floor(time / 60);
var min:Number = Math.round(time % 60);
if (hr < 1 && min < 1)
{
result = "";
var polygon:Polygon = new Polygon();
polygon.spatialReference = featureSet.spatialReference;
if(featureSet.features.length > 1)
{
//union the polygons
for each(var graphic:Graphic in featureSet.features)
{
for each(var ring:Array in (graphic.geometry as Polygon).rings)
{
polygon.addRing(ring);
@ghoti143
ghoti143 / tryjsil.cs
Created January 21, 2013 20:49
list foreach
using System;
using JSIL;
using JSIL.Meta;
using System.Collections.Generic;
public static class Program {
public static void Main () {
var list = new List<long?>() { 1, 0, 3, null };
for (int i = 0; i < list.Count; i++)
{
3173058ms chain_controller.cpp:1046 validate_block_heade ] head_block_time 2017-12-27T02:20:58, ne xt_block 2017-12-27T02:21:02, block_interval 2
3173058ms chain_controller.cpp:1048 validate_block_heade ] Did not produce block within block_inte rval 2, took 4000ms)
3173099ms wasm_interface.cpp:837 vm_call ] std::string(describeExceptionCause(e.ca use)): integer divide by zero or signed integer overflow
3173099ms wasm_interface.cpp:838 vm_call ] e.callStack: ["_ZN7Runtime14causeExcept ionENS_9Exception5CauseE","<unknown function>","<unknown function>","<function #5> (op 497)","<invoke thunk : (i6 4,i64)->()>","<unknown function>","<unknown function>","_ZNKSt8functionIFvvEEclEv","_ZN8Platform18catchHardwareTr apsERNS_9CallStackERmRKSt8functionIFvvEE","_ZN7Runtime14invokeFunctionEPNS_16FunctionInstanceERKSt6vectorINS_5Val ueESaIS3_E
@ghoti143
ghoti143 / linux_essentials.txt
Created March 12, 2018 02:06
linux essentials
screen
htop
{
"initial_timestamp": "2017-03-30T12:00:00",
"initial_parameters": {
"maintenance_interval": 86400,
"maintenance_skip_slots": 3,
"maximum_transaction_size": 2048,
"maximum_block_size": 2048000000,
"maximum_time_until_expiration": 86400,
"maximum_producer_count": 1001
},