Skip to content

Instantly share code, notes, and snippets.

View tuanminh20's full-sized avatar

Minh Nguyen (Mimi) tuanminh20

View GitHub Profile
@tuanminh20
tuanminh20 / rubocop.rb
Created May 6, 2020 07:50 — forked from skanev/rubocop.rb
A Rubocop wrapper that checks only added/modified code
#!/usr/bin/env ruby
# A sneaky wrapper around Rubocop that allows you to run it only against
# the recent changes, as opposed to the whole project. It lets you
# enforce the style guide for new/modified code only, as opposed to
# having to restyle everything or adding cops incrementally. It relies
# on git to figure out which files to check.
#
# Here are some options you can pass in addition to the ones in rubocop:
#
@tuanminh20
tuanminh20 / minna_export_tool.js
Last active April 23, 2017 10:18
Go to: http://mina.mazii.net/#/minna; chọn bài; Ctrl+Shift+J; paste; import to Quizlet
// Template term1\tmeaning1;term2\tmeaning2 ...
$(".list-kotoba").map(function(){
var hira = ($(this).find(".item-japanese").html() || "").trim();
var kanji = ($(this).find(".item-roumaji").html() || "").trim();
var meaning = ($(this).find(".item-vietnamese").html() || "").trim();
var hira_meaning = hira + "," + meaning;
var kanji_hira = kanji + "," + hira;
var kanji_hira_meaning = kanji_hira + "\n" + meaning;
if(kanji){return kanji_hira_meaning;} else{return hira_meaning;};
}).get().join(";");
@tuanminh20
tuanminh20 / gist:11e929ec43a4e306b4a63e4cda0dbf50
Created February 20, 2017 02:39
Estimate chuc nang search ground
Routes, Migration, enums grounds.ground_rank, grounds.ground_type (0.5 day)
Man hinh search: (1.5 days)
1. Not logged in: Prefecture default Toan quoc, City = Please select, Hien thi tat ca grounds (phan trang 20 each)
2. Logged in, Prefecture default = User.prefecture, City = cities of prefecture, default = User.city || please select, Ground = grounds of of prefecture (phan trang 20)
3. Prefecture changes, City = cities of prefecture, default = User.city || please select
4. Validate cho ground name
5. Chuc nang seach = ransack
6. Chuyen qua lai trang ko bi reset inputted values of form (Co the dung ajax khi chuyen trang)
7. Khi bam search, ko bi reset inputted values of form (Co the dung ajax)
[{"user":{"id":1,"name":"Anh Hoang","role":"admin","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":2,"name":"Christian Dibbert","role":"teacher","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":3,"name":"Eryn Parisian","role":"teacher","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":4,"name":"Cade Schmeler","role":"teacher","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":5,"name":"Maria Davis","role":"teacher","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":6,"name":"Richard Gutmann","role":"teacher","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":7,"name":"Turner Orn","role":"teacher","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":8,"name":"Leila Ernser","role":"teacher","image":"https://robohash.org/exliberomagnam.png?size=300x300"}},{"user":{"id":9,"name":"Cory Kuhn","role":"teacher","image":"
[
{
"name": "Elephants",
"latitude": 39.749157,
"longitude": -104.953616
},
{
"name": "Tigers",
"latitude": 39.749817,
"longitude": -104.949195
[
{
"name": "Reticulated Giraffe",
"species": "Giraffa camelopardalis reticulata",
"description": "The reticulated giraffe (Giraffa camelopardalis reticulata), also known as the Somali giraffe, is a subspecies of giraffe native to Somalia, southern Ethiopia, and northern Kenya. Reticulated giraffes can interbreed with other giraffe subspecies in captivity or if they come into contact with populations of other subspecies in the wild. \nThe reticulated giraffe is among the most well-known of the nine giraffe subspecies. Together with the Rothschild giraffe, it is by far the giraffe most commonly seen in zoos. Its coat consists of large, polygonal, liver-colored spots outlined by a network of bright-white lines. The blocks may sometimes appear deep red and may also cover the legs. The extraordinary height of giraffes is attributed to a ritual known as \"necking\", where two males fight for reproduction rights by slamming their necks into one another. The giraffes with the tallest and