This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git for-each-ref --sort='-committerdate' --format='%(committerdate) -/- %(objectname:short) -/- %(refname:short) -/- %(subject)' refs/heads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
users_data = [{ | |
"id": "7c5dae5552338874e5053f2534d2767a", | |
"email": "[email protected]", | |
"first_name": "John", | |
"last_name": "Appleseed", | |
"username": "cfuser12345", | |
"telephone": "+1 123-123-1234", | |
"country": "US", | |
"zipcode": "12345", | |
"created_on": "2014-01-01T05:20:00Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LunarDate { | |
final int year; | |
final int month; | |
final int day; | |
final int leapMonth; | |
final bool isLeapYear; | |
/// Constructs a [LunarDate] instance. | |
LunarDate(this.year, this.month, this.day, [this.isLeapYear = false, this.leapMonth = 0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class IpDetail extends StatelessWidget { | |
final String ipAddr; | |
final List<String> ipDomains; | |
IpDetail(this.ipAddr, this.ipDomains); | |
@override | |
Widget build(BuildContext context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function get_time_format() { | |
time_str_formatted=$(TZ="Asia/Tokyo" date +"$1") | |
echo "$time_str_formatted" | |
} | |
function init_log_file() { | |
if [[ ! -f "$1" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sidekiqProcessNumber=$(ps ax | grep -i [s]idekiq | wc -l) | |
pumaProcessNumber=$(ps ax | grep -i [p]uma | wc -l) | |
function pushWarningMessage() | |
{ | |
serverIP=$(hostname -i) | |
jpTime=$(TZ=":Asia/Tokyo" date +"%Y/%m/%d %H:%M:%S") | |
vnTime=$(TZ=":Asia/Ho_Chi_Minh" date +"%Y/%m/%d %H:%M:%S") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program gaCho; | |
uses | |
crt; | |
var | |
chanGa, chanCho, soGa, soCho, i: integer; | |
begin | |
clrscr; | |
soCho := 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
require "nokogiri" | |
require "open-uri" | |
require "terminal-table" | |
require "csv" | |
table_headings = ["STT", "Mã BC", "Tên Bưu cục", "BC cấp", "Địa chỉ", "Điện thoại"] | |
province = ARGV[0] | |
document = Nokogiri::HTML(open("https://inxpress360.com/ma-buu-dien-#{province}/")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "unirest" | |
require "nokogiri" | |
require "pry" | |
fb_url = "https://m.facebook.com/devvui/" | |
ua = "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.1; WebView/3.0; NOKIA; Lumia 730 Dual SIM) AppleWebKit/537.36 (KHTML, like Gecko) coc_coc_browser/55.100.7 Chrome/48.0.2564.82 Mobile Safari/537.36 Edge/14.14361" | |
html = Unirest.get fb_url, headers: {"User-Agent": ua} | |
doc = Nokogiri::HTML html.body |