Skip to content

Instantly share code, notes, and snippets.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@stephanos
stephanos / build.gradle
Created January 27, 2014 09:48
Gradle: Automate IntelliJ IDEA project generation for a Java App Engine project
def jvmRunFlags = '''
-Xmx700m
- ...
'''.split().toList()
def jvmTestFlags = '''
-Dlocally=true
-ea
- ...
'''.split().toList()
@axemclion
axemclion / README.md
Last active September 7, 2019 14:41
Angular E2E Tests (Protractor) - Performance Measurement

Protractor and Performance Test

Protractor is the end to end test case runner for AngularJS. These end to end test cases can be repurposed to record performance metrics when the scenario is being run. This is a sample repository with an example of how this can be done.

Usage

Step 0 - Setup

Install all dependencies using npm install

Step 1 - Prepare configuration

@iraycd
iraycd / xib-storyboard.md
Last active January 26, 2022 07:46
Storyboard Vs XIB

It is not to tell which one is the best. because which one is good to tell based on team requirement.

if your team have single developer its good for storyboard working less consumption time.either more number of developers use xib because it is not easily to merging the module/tasks

[xcode-using-storyboards-and-xibs-versus-creating-views-programmatically][1]

#Using XIBs

Advantages:

@bogger
bogger / deploy.prototxt
Last active May 28, 2022 21:55
GoogLeNet_cars
name: "GoogleNet"
input: "data"
input_dim: 10
input_dim: 3
input_dim: 224
input_dim: 224
# hierarchy 1
# conv -> relu -> pool -> lrn
@paulirish
paulirish / what-forces-layout.md
Last active May 21, 2024 09:11
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@jessfraz
jessfraz / proposal.md
Last active September 15, 2017 02:59

Self isolating binaries

This is a play proposal for a new wrapper around go build that would build your binary but wrap it in code that would prepare isolation around your binary on run.

A concept of this is in https://github.com/jfrazelle/binctr, in that it takes a docker image and embeds the contents into a final binary so you have a self-contained binary.

The binctr example is unnessesarily heavy for go binaries because all you need is a completely static binary.

@prats226
prats226 / semantic_transfer_learning.py
Created January 31, 2017 10:01
Sentiment classification using transfer learning
import collections, math, random, numpy
import tensorflow as tf
from sklearn.cross_validation import train_test_split
sentences = """hated the movie it was stupid;\ni hated it so boring;\nawesome the movie was inspiring;\nhated it what a disaster;\nwe hated the movie they were idiotic;\nhe was stupid, hated her;\nstupid movie is boring;\ninspiring ourselves, awesome;\ninspiring me, brilliant;\nwe hated it they were rubbish;\nany inspiring movie is amazing;\nit was stupid what a disaster;\nits stupid, rubbish;\nstupid, idiotic!;\nawesome great movie;\nboring, must be hated;\nhe was boring the movie was stupid;\nboring movie was a disaster;\nboth boring and rubbish;\nso boring and idiotic;\ngreat to amazing;\ndisaster, more than hated;\nbetween disaster and stupid;\ndisaster, so boring;\nawesome movie, brilliant;\ntoo awesome she was amazing;\nhe was brilliant loved it;\ndisaster, only idiotic;\nrubbish movie hated him;\nit was rubbish, why so stupid?;\nrubbish, too boring;\nrubbish, disaster!;\nrubbish, very
/**
* Automatically populates Zendesk public-facing "new ticket" fields
* on page load.
*
* To use, copy and paste into your New Request Page template (wrapped
* in a `<script></script>` tag).
*
* For most fields, just use the field name (so if the field is
* `request[subject]`, use `subject` in the URL, while
* `request[custom_fields][123456]` becomes `123456`). You can also use

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals