Skip to content

Instantly share code, notes, and snippets.

View amir20's full-sized avatar
🌴
On vacation

Amir Raminfar amir20

🌴
On vacation
View GitHub Profile
import 'dart:html';
import 'dart:async';
Completer _completer = new Completer();
void main() {
MutationObserver observer = new MutationObserver(onMutation);
observer.observe(document.body, childList: true, subtree: true);
diff --git a/.babelrc b/.babelrc
index e585445..725554e 100644
--- a/.babelrc
+++ b/.babelrc
@@ -5,6 +5,7 @@
{
"modules": false,
"useBuiltIns": "usage",
+ "corejs": 3,
"targets": {
@amir20
amir20 / Dockerfile
Last active October 30, 2018 15:56
FROM node:10-alpine
RUN npm install -g @vue/cli
RUN vue create -d hello-world
WORKDIR /hello-world
RUN npm run build
0xc304AEE518EE2F03335ab3506241A8dd56d0A29D
@amir20
amir20 / output.txt
Created July 28, 2016 20:18
error for phantom install
Last login: Thu Jul 28 13:12:05 on ttys002
⨉⪧ ~/Desktop/phantom-docker ⟩ docker run -it node:latest bash 13:12
Unable to find image 'node:latest' locally
latest: Pulling from library/node
5c90d4a2d1a8: Already exists
ab30c63719b1: Already exists
c6072700a242: Already exists
abb742d515b4: Pull complete
22efa86cdb65: Pull complete
@amir20
amir20 / TestExampleIssue3832.java
Last active December 24, 2015 20:29
Shows issues 3832
import com.google.common.util.concurrent.Futures;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.QueryBuilders;
@amir20
amir20 / jenkins.log
Created July 25, 2013 17:59
jenkins fail
INFO: Injecting JRuby into XStream
java.lang.IncompatibleClassChangeError: Found class com.kenai.jffi.InvocationBuffer, but interface was expected
at com.kenai.jaffl.provider.jffi.AsmRuntime.marshal(AsmRuntime.java:169)
at org.jruby.ext.posix.LinuxLibC$jaffl$0.setenv(Unknown Source)
at org.jruby.ext.posix.BaseNativePOSIX.setenv(BaseNativePOSIX.java:221)
at org.jruby.ext.posix.LazyPOSIX.setenv(LazyPOSIX.java:263)
at org.jruby.RubyGlobal$StringOnlyRubyHash.case_aware_op_aset(RubyGlobal.java:176)
at org.jruby.RubyGlobal$CaseInsensitiveStringOnlyRubyHash.op_aset(RubyGlobal.java:87)
at org.jruby.RubyHash$i$2$0$op_aset.call(RubyHash$i$2$0$op_aset.gen:65535)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:332)
RewriteEngine On
RewriteBase /~amirraminfar/scipose/
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
@amir20
amir20 / gist:4048488
Created November 9, 2012 21:51 — forked from jeffkole/gist:4047435
Avro IO with different reader and writer schemas
WRITER_SCHEMA = <<-JSON
{ "type": "record",
"name": "User",
"fields" : [
{"name": "username", "type": "string"},
{"name": "age", "type": "int"},
{"name": "verified", "type": "boolean", "default": "false"}
]}
JSON
$ rvm reinstall 1.9.3 --debug
1.9.3 - reinstall
Removing /Users/amirraminfar/.rvm/src/ruby-1.9.3-p286...
/Users/amirraminfar/.rvm/rubies/ruby-1.9.3-p286 has already been removed.
Remote file does not exist http://jruby.org.s3.amazonaws.com/downloads/ruby-1.9.3-p286.tar.bz2
Found remote file https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p286.tar.bz2
https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p286.tar.bz2 - #configure
ruby-1.9.3-p286 - #download
Fetching: https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p286.tar.bz2?rvm=1.16.17
Fetch command: curl -f -L --create-dirs -C - -o bin-ruby-1.9.3-p286.tar.bz2