Skip to content

Instantly share code, notes, and snippets.

View kidager's full-sized avatar
🎧
¯\_(ツ)_/¯

Jacem Chaieb kidager

🎧
¯\_(ツ)_/¯
View GitHub Profile
@tehprofessor
tehprofessor / karabiner-fix.sh
Created July 4, 2019 18:03
Karabiner Elements "Fix-It" for Catalina Beta
#!/bin/sh
KARABINER_ELEMENTS_PATH="/Applications/Karabiner-Elements.app"
echo "Killing Karabiner & associated processes"
sudo pkill -f Karabiner -9 # Kills the main Karabiner UI
sudo pkill -f karabiner -9 # Kills the background processes
echo "Starting Karabiner-Elements... It may be up to a minute after opening Karabiner-Elements before your custom keys activate."
open $KARABINER_ELEMENTS_PATH # Open it back up!
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active April 10, 2024 16:40
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@joshmfrankel
joshmfrankel / .zshrc
Last active August 20, 2023 23:04
Oh-my-zsh + powerlevel9k + powerline fonts + awesome-terminal-fonts + syntax highlighting
# References
# OhMyZsh: https://github.com/robbyrussell/oh-my-zsh
# Powerlevel9k: https://github.com/bhilburn/powerlevel9k
# Powerline fonts: https://github.com/powerline/fonts
# Awesome Terminal Fonts: https://github.com/gabrielelana/awesome-terminal-fonts
# ZSH Syntax Highlighting: https://github.com/zsh-users/zsh-syntax-highlighting
#
# For more plugins search this repo: https://github.com/unixorn/awesome-zsh-plugins
# 256 color mode
@ocombe
ocombe / translateUniversalLoader.ts
Last active May 11, 2023 07:01
ng2-translate file loader for Angular Universal (server side)
import {TranslateLoader} from "ng2-translate/ng2-translate";
import {Observable} from "rxjs/Observable";
import fs = require('fs');
export class TranslateUniversalLoader implements TranslateLoader {
constructor(private prefix: string = 'i18n', private suffix: string = '.json') {}
/**
* Gets the translations from the server
* @param lang
@davideicardi
davideicardi / mongo-docker.bash
Last active July 16, 2023 18:18
Running mongodb inside a docker container (with mongodb authentication)
# Create a container from the mongo image,
# run is as a daemon (-d), expose the port 27017 (-p),
# set it to auto start (--restart)
# and with mongo authentication (--auth)
# Image used is https://hub.docker.com/_/mongo/
docker pull mongo
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception)
# add a root user
@jpchateau
jpchateau / Interview back-end developer
Last active April 4, 2024 16:03
Entretien développeur back : PHP / Symfony / MySQL
Cible : Développeur PHP / Symfony / MySQL
Niveau : Senior
Ce document propose des questions classiques, sans piège, à poser lorsque vous désirez valider un candidat pour un poste de développeur back.
J'utilise personnellement cette trame de questions, libre à vous de vous en inspirer, d'ajouter vos propres questions, et de déterminer lesquelles sont éliminatoires à vos yeux.
Veille technologique
Quelle est la version actuelle de PHP ?
> http://php.net/supported-versions.php
@shivaas
shivaas / codeigniter-apache-hhvm.md
Last active March 13, 2018 16:08
CodeIgniter with Apache & HHVM as FastCGI

Apache Configuration:

<VirtualHost *:80>
  ServerName blah.com

  DirectoryIndex index.html index.php
  ProxyRequests On
  ProxyPreserveHost On
  ProxyVia full
@joshmfrankel
joshmfrankel / convertTwoSpacesToFour.sublime-macro
Created June 4, 2013 15:50
Sublime: Convert 2 Spaces to 4
[
{
"args": null,
"command": "select_all"
},
{
"args":
{
"set_translate_tabs": true
},