Skip to content

Instantly share code, notes, and snippets.

View slakat's full-sized avatar
🎧

Katherine Páez Ramos slakat

🎧
View GitHub Profile
@rponte
rponte / git-revert-multiple-commits.sh
Created September 25, 2019 16:07
Git: reverting a range of commits
##
# Reverting a range of commits
#
# git --pretty=oneline --abbrev-commit older_commit..newer_commit # not includes the oldest commit
# git --pretty=oneline --abbrev-commit older_commit^..newer_commit # includes the oldest commit
##
# just to be sure about the commits, list them
git log --pretty=oneline --abbrev-commit 1f80548^..4b293d5
@yossisp
yossisp / Dockerfile-prod1
Last active March 1, 2024 00:29
nginx setup for multiple docker-compose containers (react.js app, node.js server)
# Dockerfile for react.js app and nginx
# build environment
FROM node:8-alpine as builder
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
RUN npm install
COPY . /usr/src/app
RUN npm run build --loglevel verbose
@IndianGuru
IndianGuru / myfirstbot.go
Last active May 22, 2020 11:37
My First Telegram Bot
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strconv"
)
anonymous
anonymous / gmaps-drawing-tools-places.htm
Created July 1, 2015 04:54
gmaps-drawing-tools-places.htm
<!DOCTYPE html>
<!-- http://gmaps-samples-v3.googlecode.com/svn/trunk/drawing/drawing-tools.html -->
<!-- https://developers.google.com/maps/documentation/javascript/examples/places-searchbox -->
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools (B)</title>
<!-- NOTE: two libraries to load are comma-separated; otherwise last mention of the query string arg overwrites the previous -->
<script type="text/javascript"
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@mendlin
mendlin / bootstrap_table.sublime-snippet
Created March 14, 2013 04:57
HAML: Bootstrap Table
<snippet>
<content><![CDATA[
%table.table.table-striped
%tr
%th.span1= ${1:head1}
%th.span1= ${2:head2}
%th.span2= ${3:head3}
- @${4:collection}.each do |m|
%tr
%td= ${5:data1}
@pifleo
pifleo / confirmation_instructions.html.haml
Created June 6, 2012 14:37
Devise custom mailer layout with inline attachments
-# app/views/devise_custom_mailer/confirmation_instructions.html.haml
%p
= t('devise.mailer.welcome', :email => @resource.email)
%p= t('devise.mailer.confirmation_instructions.msg')
%p= link_to t('devise.mailer.confirmation_instructions.link'), confirmation_url(@resource, :confirmation_token => @resource.confirmation_token)
%br
- if @resource.tmp
%p
= t('devise.mailer.confirmation_instructions.password_instruction', :password => @resource.tmp)