Skip to content

Instantly share code, notes, and snippets.

Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
@phptuts
phptuts / drupal-installation.md
Last active March 15, 2020 02:49
Installing Drupal With land
lando poweroff
rm -rf yoursitename && mkdir -p yoursitename && cd yoursitename
lando init --source remote --remote-url https://www.drupal.org/download-latest/tar.gz --remote-options="--strip-components 1" --recipe drupal8 --webroot . --name yoursitename
lando start

Data Information

database name: yoursitename

@j127
j127 / auth_controller.rb
Last active October 28, 2019 15:10
Rails 5.2 with Discourse SSO Authentication
# This is just a sketch. Please leave a comment if you have suggestions.
class AuthController < ApplicationController
# Generate and SSO URL and redirect the user to Discourse
def authenticate
# Save the ?destination=some_url parameter if it exists
destination = request.query_parameters['destination'] || root_url
session[:destination] = destination
# `nonce` here will have `:value` and `:created_at` keys
nonce = generate_nonce
@rgruesbeck
rgruesbeck / random.sh
Last active November 13, 2018 00:53
get random strings from your mic
#!/usr/bin/env bash
clip() {
# sync clipboards
xclip -o | xclip -sel clip
# print to stdout
xclip -o
}
@juanpabloaj
juanpabloaj / Dockerfile
Last active March 15, 2020 13:19
elixir and phoenixframework with docker-compose
FROM elixir:slim
# install Node.js (>= 8.0.0) and NPM in order to satisfy brunch.io dependencies
# See https://hexdocs.pm/phoenix/installation.html#node-js-5-0-0
RUN apt-get update -y && \
apt-get install -y curl git && \
curl -sL https://deb.nodesource.com/setup_13.x | bash - && \
apt-get install -y inotify-tools nodejs
WORKDIR /code
@mino98
mino98 / checkpass.sh
Last active March 14, 2018 23:07
Check password against pwnedpasswords repo.
#!/bin/bash
# Original:
# https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity
echo -n Password:
read -s password
echo
hash="$(echo -n $password | openssl dgst -sha1 -binary | xxd -p)"
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')"
@Mohamed3on
Mohamed3on / The Technical Interview Cheat Sheet.md
Last active April 23, 2020 20:47 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is a fork to fix the markdown errors in the original gist.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@gvergnaud
gvergnaud / Promises-under-the-hood.md
Last active December 24, 2023 18:35
Promises, under the hood.

Promises, under the hood

You all know that to create a new Promise you need to define it this way:

  new Promise((resolve, reject) => {
    ...
    resolve(someValue)
  })

You are passing a callback that defines the specific behavior of your promise.

@nerdyworm
nerdyworm / rename.sh
Created July 30, 2016 17:40
rename a phoenix project
#!/bin/bash
set -e
CURRENT_NAME="CurentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"