Skip to content

Instantly share code, notes, and snippets.

View rjfranco's full-sized avatar
🙂
Either working or playing video games

Ramiro Jr. Franco rjfranco

🙂
Either working or playing video games
View GitHub Profile
@miglen
miglen / packagejson.py
Created February 10, 2021 11:55
Dirty check for non existing public npm dependencies
#!/bin/env python3
# https://www.bleepingcomputer.com/news/security/researcher-hacks-over-35-tech-firms-in-novel-supply-chain-attack/
# The following script finds all package.json files in the current dir and checks if there are referenced any
# dependencies that no public package is available for, making your application vulnerable to supply-chain attack.
# Simply run ./packagejson.py in your root repository direcotory.
import json
import requests
from pathlib import Path
import urllib.parse
@machty
machty / ember-cli-build.js
Last active November 25, 2022 13:21
Broccoli challenges
/* jshint node: true */
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const generateWhitelabelIndexes = require('./generate-whitelabel-indexes');
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
// ...all sorts of config
});
@chrismccord
chrismccord / phx-1.4-upgrade.md
Last active June 16, 2023 06:22
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new phx.new project generator

The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run:

@krider2010
krider2010 / .profile
Last active November 29, 2017 06:13
Git Signed Commits - OSX and GUIs
# This would go into .bash_profile, .bashrc, .zshrc, etc.
# Script to start the gpg-agent - in it's own file as it is also used when the machine starts up
# Be sure to update the path to wherever you place this file!
# Note, depending on shell you may not need this line enabling, if the global daemon is already running
# OK. Some shells complain, others don't!
~/bin/startup-gpg-agent.sh
# GPG
if [ -f "${HOME}/.gpg-agent-info" ]; then
@CMCDragonkai
CMCDragonkai / job_control_zsh_bash.md
Last active August 1, 2024 00:35
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
command
# run commend in the background
@Falconerd
Falconerd / gulpfile.js
Last active April 10, 2019 17:16
Gulp + Watchify + Babelify + BrowserSync
/**
* This gulpfile will copy static libraries and a index.html file as well as
* merge, babelify and uglify the rest of the javascript project.
*
* TODO:
* - Separate media, libs and src with different watchers.
* - Media and libs should only be copied to dist if they are different sizes.
*
* The expected project is to be laid out as such:
*
@mboeh
mboeh / cnd.rb
Created July 28, 2014 19:20
cnd.rb
alias λ proc
alias _l proc
class Object
def cnd(t:λ{},f:λ{})
t[]
end
end
class NilClass
@mboeh
mboeh / speak.rb
Last active August 29, 2015 14:04 — forked from mrinterweb/speak.rb
#! /usr/bin/env ruby
# Some of the words are misspelled to help the say program pronounce them right
#
# copy the following line and paste for fun!
# curl -O https://gist.githubusercontent.com/mrinterweb/0ed2ac30a97e25e03fad/raw/5da7c2a012a08cfcc9649e0f410d53f8986e4990/speak.rb && mv speak.rb speak && chmod a+x speak && ./speak
def envlist(name, &default)
results = (ENV["SPEAK_#{name.to_s.upcase}"] || "").split(":")
results.empty? ? default.call : results
end
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@lavoiesl
lavoiesl / service.sh
Last active May 3, 2023 11:52
Mac OS launchctl utility with support for partial match
#!/bin/bash
# Mac OS launchctl utility
# Support partial match
# Will exit on error if no of more than one service is found.
#
# @link http://blog.lavoie.sl/2013/08/service-management-utility-for-mac-osx.html
# @link https://gist.github.com/lavoiesl/6160897
#
# Usage:
# service selfupdate