Skip to content

Instantly share code, notes, and snippets.

View niquepa's full-sized avatar

Carlos Castillo niquepa

  • New York
View GitHub Profile
@niquepa
niquepa / GIF-Screencast-OSX.md
Last active December 13, 2021 21:59 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF gif ffmpeg video

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@evantoli
evantoli / GitConfigHttpProxy.md
Last active April 26, 2024 17:21
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:

@waissbluth
waissbluth / _hreflang.html.haml
Last active July 27, 2022 17:57
Ruby on Rails SEO. Add a <link rel="alternate" hreflang="es" href="http://es.example.com/" /> link to every other locale for the same page. Per https://support.google.com/webmasters/answer/189077?hl=en
-# For each locale except the current one
- (I18n.available_locales - [I18n.locale]).each do |locale|
-# Add a link to the current URL but in `locale` language
%link{rel: 'alternate', hreflang: locale, href: url_for(locale: locale)}
@denji
denji / README.md
Last active April 26, 2024 18:09 — forked from istepanov/gist:3950977
Remove/Backup – settings & cli for macOS (OS X) – DataGrip, AppCode, CLion, Gogland, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm
def convert_base64_image(data, type)
io = FileIo.new(Base64.decode64(data))
io.class.class_eval { attr_accessor :original_filename, :content_type }
io.original_filename = "photo.jpeg"
io.content_type = type
self.profile_photo = io
end
#POST /v1/users/{id}/profile_photo
def create
user = User.where(_id: params[:id]).first
app_decorator = ApplicationDecorator.new(User)
if !user.nil?
user_decorated = UserDecorator.decorate(user)
# RailsAdmin config file. Generated on April 04, 2013 19:54
# See github.com/sferik/rails_admin for more informations
RailsAdmin.config do |config|
################ Global configuration ################
# Set the admin name here (optional second array element will appear in red). For example:
config.main_app_name = ['Issue1591', 'Admin']
@davidwkeith
davidwkeith / index.html
Last active April 10, 2024 12:01
NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom protocol handlers. Licensed under the WFTPL http://www.wtfpl.net/txt/copying/
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!--
NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom
protocol handlers.
@nz
nz / Delete all documents in a Solr index using curl.md
Last active February 12, 2024 10:55
Delete all documents in a Solr index using curl
# http://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F
# http://wiki.apache.org/solr/UpdateXmlMessages#Updating_a_Data_Record_via_curl

curl "http://index.websolr.com/solr/a0b1c2d3/update?commit=true" -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

I'm amused at the traction this little gist is getting on Google! I would be remiss not to point out that six+ years later I'm still helping thousands of companies on a daily basis with their search index management, by providing managed Solr as a service over at Websolr, and hosted Elasticsearch at Bonsai. Check us out if you'd like an expert helping hand at Solr and Elasticsearch hosting, ops and support!