Skip to content

Instantly share code, notes, and snippets.

View kapoorlakshya's full-sized avatar
🙃

Lakshya Kapoor kapoorlakshya

🙃
View GitHub Profile
@nicinabox
nicinabox / env.sh
Created May 1, 2012 18:27
Pack Chrome extensions from the command line
# $ crx `pwd`
function crx() {
~/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --pack-extension=$@ --pack-extension-key=$@/key.pem
}
@stevenharman
stevenharman / defaults.rb
Last active July 7, 2021 14:36
A subtle difference between Ruby's Hash.fetch(:key, :default) vs. (Hash[:key] || :default)
h = {
'a' => :a_value,
'b' => nil,
'c' => false
}
h.fetch('a', :default_value) #=> :a_value
h.fetch('b', :default_value) #=> nil
h.fetch('c', :default_value) #=> false
h.fetch('d', :default_value) #=> :default_value
@sleekweasel
sleekweasel / README.md
Last active February 10, 2019 11:44
Hooks for recording video of cucumber tests
@evantoli
evantoli / GitConfigHttpProxy.md
Last active July 20, 2024 03:29
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@iandundas
iandundas / xcode-downloader.rb
Created February 21, 2017 09:02
Script for reliably downloading binaries (e.g. Xcode) from Apple's CDN
#!/usr/bin/env ruby
print "What is the URL of your Apple Downloads resource?\nURL:"
url = gets.strip
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
token = gets.strip
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"
@perlun
perlun / .travis.yml
Last active April 14, 2019 07:52
Super-fast Travis JRuby install
# Background: JRuby installs on Travis is painfully slow. The version which is preinstalled is very old. Here are some GitHub
# issues about it:
#
# https://github.com/travis-ci/docs-travis-ci-com/pull/743
# https://github.com/travis-ci/travis-rubies/issues/22
# https://github.com/travis-ci/travis-ci/issues/6892
# https://github.com/travis-ci/packer-templates/issues/391
#
# Since the upstream issue is still unresolved, and a JRuby install takes anywhere from 100 to 200 seconds (!), we decided to
# implement this workaround. With this in place, the JRuby install takes about 10 seconds.

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

which packages does qtdb depend on?

@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active July 3, 2024 03:59
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@danwhitston
danwhitston / wsl_first_time_setup.sh
Last active May 7, 2022 13:34
Setting up my WSL environment - includes git & key, rbenv, rbenv ruby-build, attis, imagemagick, ruby, bundler, mysql, mongodb, redis
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade
ln -s "/mnt/c/Users/Daniel/Documents/homeflow" ~/homeflow
ln -s "/mnt/c/Users/Daniel/Documents" ~/documents
mkdir .ssh
cp documents/id* .ssh/
sudo chmod 600 .ssh/*
cd homeflow/attis
git pull
@kevinGodell
kevinGodell / appveyor.yml
Created February 13, 2018 19:24
Appveyor deployment install ffmpeg
image: Visual Studio 2017
environment:
ffmpeg_download: https://ffmpeg.zeranoe.com/builds/
matrix:
- platform: x64
nodejs_version: LTS
ffmpeg_version: 3.4.1
ffmpeg_platform: win64