Skip to content

Instantly share code, notes, and snippets.

View thanhcuong1990's full-sized avatar
🏠
Working from home

Cuong Lam thanhcuong1990

🏠
Working from home
View GitHub Profile
@stas
stas / deploy.rb
Created January 15, 2013 15:34
Mina Deploy Task (Rails + Puma + Delay Job + rbenv)
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
# require 'mina/rvm' # for rvm support. (http://rvm.io)
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
@plentz
plentz / nginx.conf
Last active April 18, 2024 12:42
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@yonat
yonat / Badge.swift
Last active December 22, 2022 09:40
Rounded UILabel and UIButton, Badged UIBarButtonItem
//
// Badge.swift
// Extensions for Rounded UILabel and UIButton, Badged UIBarButtonItem.
//
// Usage:
// let label = UILabel(badgeText: "Rounded Label");
// let button = UIButton(type: .System); button.rounded = true
// let barButton = UIBarButtonItem(badge: "42", title: "How Many Roads", target: self, action: "answer")
//
// Created by Yonat Sharon on 06.04.2015.
@esamattis
esamattis / WebViewAutoHeight.js
Last active February 11, 2022 16:01
React native: Is it possible to have the height of a html content in a webview? http://stackoverflow.com/q/32952270
/*
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2016 Esa-Matti Suuronen <esa-matti@suuronen.org>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@neilsarkar
neilsarkar / AppText.js
Created January 10, 2017 01:48
React Native Text Wrapper for default font
'use strict';
import React, {Component} from 'react';
import {
Text,
} from 'react-native';
export default class AppText extends Component {
constructor(props) {
super(props)
@ilya-uryupov
ilya-uryupov / App.jsx
Last active November 17, 2020 04:41
React-Native copy-paste'able multiline TextInput inside ViewPagerAndroid
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react'
import { StyleSheet, Text, TextInput, View, ViewPagerAndroid } from 'react-native'
const rnVersion = '0.52.0'