Skip to content

Instantly share code, notes, and snippets.

View singuerinc's full-sized avatar
😀

Nahuel Scotti singuerinc

😀
View GitHub Profile
@easa
easa / copy-registry-publish-bash.yml
Last active June 17, 2020 16:16
npm publish to gpr
# on a situation that both publish on npm and gpr are required. the package.json file should stay clean!
# but other ways to set the registry won't work so there we should change the package.json on bash!
# there we go:
jobs:
publish-gpr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
@DrBoolean
DrBoolean / fp_arch.js
Last active October 27, 2020 09:57
OO => FP architecture refactor
// Simple example, but the idea holds for more complex objects.
/* 1) Start with OO */
// user.js
class User {
constructor(firstName, lastName, email) {
this.firstName = firstName
this.lastName = lastName
@silentHoo
silentHoo / publish_to_private_npm_from_ci.md
Last active September 21, 2022 06:49
Push and pull into and from your private npm registry via CI pipeline

Publish to private npm registry from your CI pipeline

If you want to publish packages to your private registry, e.g. to jfrog.io/Verdaccio/... you should note some important things:

1) Authenticate on your local machine

To authenticate against the private repository, you've to use the npm cli tool. But first you should get your API access token. That's safer than using your password.

npm adduser --registry https://<registry_url>/<api_path>/ --always-auth
@gorbypark
gorbypark / coreos-ignition-docker-start-on-boot.MD
Last active April 18, 2021 20:29
Container Linux (CoreOS) and how to get docker to start on boot using ignition.

Container Linux (CoreOS), digitalocean and starting docker on boot

Container Linux (CoreOS) doesn't enable the docker systemd service by default. If you start a container with the --restart=always flag, for example, your container will not start up again automatically after a reboot. This may be desirable if you're running a cluster with an orchestration system that will handle this for you, but if you are using Container Linux with a single instance you might want your containers to start up by themselves. Of course you can easily enable to systemd service from the command line, but the best way is to pass an Ignition config file during the droplet creation process.

  1. Under the "Select additional options" section, select "User Data"
  2. In the box, paste the following Ignition config
{
  "ignition": { "version": "2.2.0" },
  "systemd": {
    "units": [{
 "name": "docker.service",
@mariozig
mariozig / migrate_repo.sh
Last active December 22, 2022 08:32
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@singuerinc
singuerinc / gist:c8cbabc5f115fe1b4d75
Created November 30, 2014 10:21
50 largest directories and files
du -h * | sort -rh | head -50
@dedy-purwanto
dedy-purwanto / gist:11312110
Created April 26, 2014 05:00
Bulk remove iTerm2 color schemes.
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all.
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one.
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files.
$ cd /tmp/
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist .
$ plutil -convert xml1 com.googlecode.iterm2.plist
$ vi com.googlecode.iterm2.plist
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@cowboy
cowboy / create_108_usb_install.sh
Created July 29, 2012 13:33
bash: Create a 10.8 "USB Install Stick" from InstallESD.dmg
#!/bin/bash
# Before running this script, open Disk Utility.
#
# Partition USB Stick:
# * 1 Partition
# * Options -> GUID Partition Table
# * Mac OS Extended (Journaled)
# * Name: Foobar
#
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/