Skip to content

Instantly share code, notes, and snippets.

View allurco's full-sized avatar
🎯
Focusing

Rogers Sampaio allurco

🎯
Focusing
View GitHub Profile
@yurenju
yurenju / Ship.sol
Created January 6, 2022 07:52
OpenZeppelin BeaconProxy
pragma solidity 0.8.7;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
contract Ship is Initializable {
string public name;
uint256 public fuel;
function initialize(string memory _name, uint256 _fuel) external initializer {
name = _name;
@pavelthq
pavelthq / custom_view.js
Last active March 27, 2024 14:51
Visual Composer: Custom markup element example
(function($) {
window.VcCustomElementView = vc.shortcode_view.extend( {
elementTemplate: false,
$wrapper: false,
changeShortcodeParams: function ( model ) {
var params;
window.VcCustomElementView.__super__.changeShortcodeParams.call( this, model );
params = _.extend( {}, model.get( 'params' ) );
if ( ! this.elementTemplate ) {
@asugai
asugai / Install composer on Amazon AMI running on EC2
Last active May 14, 2024 15:14
Install composer on Amazon AMI running on EC2
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install
@danielphillips
danielphillips / UILabel+dynamicSizeMe.h
Created June 2, 2011 22:54
Adjust UILabel to change it's frame according to it's content
@interface UILabel (dynamicSizeMe)
-(float)resizeToFit;
-(float)expectedHeight;
@end