Skip to content

Instantly share code, notes, and snippets.

View albacoretuna's full-sized avatar

Nick O. albacoretuna

View GitHub Profile
@albacoretuna
albacoretuna / index.html
Last active August 29, 2015 14:11
Sekender A HTML5 app to find the nearest second hand store.
<!DOCTYPE html>
<html>
<head>
<!-- I have used jQuery Mobile for the UI, Google api for the map. So here comes all the js libraries, jquery, jquery mobile, google maps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<link rel="stylesheet" href="styles.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
@kosiara
kosiara / setup_howto.txt
Last active April 21, 2017 03:42
Setup Facebook React-native sample (empty) project on Ubuntu
# author:
# @Bartosz Kosarzycki
#
sudo apt-get install npm
sudo npm install -g react-native-cli
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /home/user/your/project/path
react-native init AwesomeProject
cd AwesomeProject
@philss
philss / ternjs-with-neovim.md
Last active August 12, 2018 13:26
Some details about my installation of Ternjs with Neovim and Deoplete

Ternjs with Neovim

  • upgrade nvim (in my case, I have the master version):
$ brew tap neovim/neovim
$ brew reinstall --HEAD neovim
  • check Python 2 and 3, if are installed:
$ which python2
@insin
insin / scraping-101.rst
Last active March 7, 2020 04:10
Scraping 101 (with Scrapy)

Scrapy takes care of the bulk of the work for common steps involved in web scraping so you only need to concentrate on the where and how of retrieving the information you want - it also caches HTTP requests, so you only need to hit the target site once and subsequent re-runs are quick.

Target Site

Tesco's Store Locator

Target URL

http://www.tesco.com/storeLocator/

Determining Store IDs

@mjul
mjul / 02_nginx_gzip_configuration.config
Last active November 6, 2020 03:29
Enable gzip compression in Elastic Beanstalk Docker nginx proxy (add to .ebextensions folder)
files:
"/etc/nginx/conf.d/gzip.conf":
mode: "644"
owner: "root"
group: "root"
content: |
# enable gzip compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
@kitten
kitten / reactiveconf-sc-cfp.md
Last active November 17, 2020 15:06
ReactiveConf 2017 Lightning Talk CFP: With styled-components into the future

styled-components Logo

With styled-components into the future

Preprocessing is dead, long live preprocessing!


This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf

@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@vvgomes
vvgomes / foo.js
Last active August 10, 2021 18:10
Ramda vs Lodash
var _ = require("lodash");
var R = require("ramda");
var companies = [
{ name: "tw", since: 1993 },
{ name: "pucrs", since: 1930 },
{ name: "tw br", since: 2009 }
];
var r1 = _(companies).chain()
@n1k0
n1k0 / gist:1501173
Created December 20, 2011 10:44 — forked from fbuchinger/gist:1501115
PhantomJS: Capturing single dom elements as png files
var page = new WebPage(),
address, output, size;
//capture and captureSelector functions adapted from CasperJS - https://github.com/n1k0/casperjs
capture = function(targetFile, clipRect) {
var previousClipRect;
var clipRect = {top: 0, left:0, width: 40, height: 40};
if (clipRect) {
if (!isType(clipRect, "object")) {
throw new Error("clipRect must be an Object instance.");
@MrDys
MrDys / gist:3512455
Created August 29, 2012 13:26
Link directly to an open modal window in Bootstrap
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it:
Make sure your modal has an id:
<div class="modal" id="myModal" ... >
Then stick this bit of Javascript at at the end of your document:
*/
$(document).ready(function() {