Skip to content

Instantly share code, notes, and snippets.

@MakarovCode
MakarovCode / gamepadviewer-n64.css
Last active October 21, 2022 05:50
Game pad viewer Nintendo 64 Game Pad Skin
/*https://gamepadviewer.com/?p=1&css=https%3A%2F%2Fgistcdn.githack.com%2FMakarovCode%2F252a177ccf619fb8fee5777ca89ec413%2Fraw%2Fa9d7fdb329f7cc82c8c954e428983dcf037f14df%2Fgamepadviewer-n64.css&map=%7B%22mapping%22%3A%5B%7B%22targetType%22%3A%22buttons%22%2C%22target%22%3A%229%22%2C%22disabled%22%3Afalse%2C%22choiceType%22%3A%22buttons%22%2C%22choice%22%3A%220%22%7D%2C%7B%22targetType%22%3A%22buttons%22%2C%22target%22%3A%228%22%2C%22disabled%22%3Afalse%2C%22choiceType%22%3A%22buttons%22%2C%22choice%22%3A%222%22%7D%2C%7B%22targetType%22%3A%22buttons%22%2C%22target%22%3A%2216%22%2C%22disabled%22%3Afalse%2C%22choiceType%22%3A%22buttons%22%2C%22choice%22%3A%229%22%7D%2C%7B%22targetType%22%3A%22buttons%22%2C%22target%22%3A%220%22%2C%22disabled%22%3Afalse%2C%22choiceOperand%22%3A%22-%22%2C%22choiceType%22%3A%22axes%22%2C%22choice%22%3A%223%22%7D%2C%7B%22targetType%22%3A%22buttons%22%2C%22target%22%3A%223%22%2C%22disabled%22%3Afalse%2C%22choiceOperand%22%3A%22%2B%22%2C%22choiceType%22%3A%22axes%22%2C%22choice%22%3A%2
@MakarovCode
MakarovCode / ascii_art.rb
Created June 5, 2021 04:28
Ruby Class to turn images into Ascii Art using braille character
require "mini_magick"
class AsciiArt
attr_accessor :path, :inverted, :size, :art
# Make sure size is in this format 100x100 or 50x600
def initialize(path, inverted=nil, size=nil)
@path = path
@inverted = inverted
@MakarovCode
MakarovCode / ruby_script.service
Created June 5, 2021 03:29
Ruby Script SystemCtl Daemon File
[Unit]
Description=gps_client
After=syslog.target network.target
[Service]
Type=simple
WorkingDirectory=/home/ubuntu/motosmart/current/lib
ExecStart=ruby /home/ubuntu/motosmart/current/lib/ruby_script.rb
@MakarovCode
MakarovCode / sidekiq.service
Created June 5, 2021 03:28
Sidekiq SystemCtl Daemon file
[Unit]
Description=sidekiq
After=syslog.target network.target
[Service]
Type=simple
WorkingDirectory=/home/rails/project/current
ExecStart=/home/rails/.rbenv/shims/bundle exec sidekiq -e production -L /home/rails/project/current/log/sidekiq.log
@MakarovCode
MakarovCode / default
Created June 5, 2021 03:26
Nginx sites-enabled for Ruby on Rails
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@MakarovCode
MakarovCode / angular-decimalmax.js
Created November 12, 2020 14:47
AngularJS pipe filter for handling decimals up to a max
var module = angular.module('app', [])
//Just add this after you declare your main module
module.filter('decimalmax', ['$filter', function ($filter) {
return function(num, params) {
if (num == null) return 0;
var v = (num + "").split(".");
var pres = 0
if (v.length > 1){
var p = v[1].length;
if (p <= params){
angular.module('app.controllers', [])
.controller('mercadoCtrl', ['$http', '$scope', '$stateParams', // The following is the constructor function for this page's controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($http, $scope, $stateParams) {
$scope.productos = [];
$scope.Init = function(){
@MakarovCode
MakarovCode / init.coffee
Last active March 16, 2019 13:47
Configuraciones Atom
atom.commands.add 'atom-text-editor', 'custom:reformat', ->
editor = atom.workspace.getActiveTextEditor();
oldRanges = editor.getSelectedBufferRanges();
editor.selectAll();
atom.commands.dispatch(atom.views.getView(editor), 'editor:auto-indent')
editor.setSelectedBufferRanges(oldRanges);
@MakarovCode
MakarovCode / config.xml
Last active March 9, 2019 04:53
Archivo de configuración config.xml para exportar aplicaciones con phonegap o cordova
<?xml version='1.0' encoding='utf-8'?>
<widget id="co.devpenguin.appto" version="0.1.8" android-versionCode="106" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>Market</name>
<description>
Una app genial
</description>
<author email="holamundocursos@gmail.com" href="http://devpenguin.co">
Hola Mundo
</author>