Skip to content

Instantly share code, notes, and snippets.

View giefferre's full-sized avatar

Gianfranco Reppucci giefferre

View GitHub Profile
@HJianBo
HJianBo / LC_CTYPE.txt
Created November 7, 2017 02:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@josegonzalez
josegonzalez / redis_migrate.py
Last active April 25, 2024 02:34 — forked from iserko/redis_migrate.py
A simple script to migrate all keys from one Redis to another
#!/usr/bin/env python
import argparse
import redis
def connect_redis(conn_dict):
conn = redis.StrictRedis(host=conn_dict['host'],
port=conn_dict['port'],
db=conn_dict['db'])
return conn
@anythingcodes
anythingcodes / google-form-to-github-issue.md
Last active March 22, 2024 18:53
Generate GitHub Issue from Google Form submission

Generate GitHub Enterprise Issue from Google Form submission

To generate a nicely-formatted GitHub issue (even for GitHub Enterprise accounts) from a Google Form submission, you can use Google's script editor along with a GitHub personal access token that connects to the API. This is particularly useful when you need to triage bugs or feature requests directly to developers, but those who are submitting issues do not have access to your GitHub Enterprise instance.

Once this is up and running, on the development end, you can do some cool things within the body of each issue, like automatically closing GitHub issues via your commit messages and CCing your dev group or individual team members for each issue.

Here's how to set it up.

Step 1: Create Your Form

  • Go to Google Drive and create a form with fields
  • Click the Responses tab
@mandiwise
mandiwise / Update remote repo
Last active May 2, 2024 08:59
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@nicolashery
nicolashery / elasticsearch.md
Last active December 30, 2023 19:03
Elasticsearch: updating the mappings and settings of an existing index

Elasticsearch: updating the mappings and settings of an existing index

Note: This was written using elasticsearch 0.9.

Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:

$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
  "_id": 1,