Skip to content

Instantly share code, notes, and snippets.

Avatar

Cid Lopes supercid

View GitHub Profile
View hexspeak
00D1E5
0111E
0115
011ED
011F1E1D
011F1E1D5
015E
01AF
01D1E
View MaskExtension.php
<?php
// src/AppBundle/Twig/MaskExtension.php
namespace AppBundle\Twig;
class MaskExtension
{
public function mask($value, $mask)
{
$maskared = '';
$value = (string) $value;
@supercid
supercid / tmux.conf
Last active Mar 15, 2019 — forked from rajanand02/tmux.conf
Tmux configurations with status bar theme
View tmux.conf
# set prefix to control-f
set -g prefix C-f
#unbind system defined prefix
unbind C-b
# helps in faster key repetition
set -sg escape-time 0
# start session number from 1 rather than 0
@supercid
supercid / htop-1.0.2-temperature.patch
Created May 25, 2017 — forked from rstemmer/htop-1.0.2-temperature.patch
Adds a new Meter to htop that displays your core temperatures. You need the lm_sensors package to use this meter. After applying this patch, you have to call ./autogen.sh before configuring and compiling.
View htop-1.0.2-temperature.patch
diff -urN htop-1.0.2-orig/CRT.c htop-1.0.2/CRT.c
--- htop-1.0.2-orig/CRT.c 2013-03-23 14:10:29.500604247 +0100
+++ htop-1.0.2/CRT.c 2013-03-23 14:11:01.916663508 +0100
@@ -59,6 +59,9 @@
UPTIME,
BATTERY,
TASKS_RUNNING,
+ TEMPERATURE_COOL,
+ TEMPERATURE_MEDIUM,
+ TEMPERATURE_HOT,
@supercid
supercid / Run in LOCAL terminal...
Created Jul 17, 2017 — forked from jswartwood/Run in LOCAL terminal...
Automatic Git deploys on Dreamhost
View Run in LOCAL terminal...
# Replace any brackets with real values
# Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal
ssh [user]@[host]
cd ~
mkdir [mydomain_com].git
cd [mydomain_com].git
git init --bare
vi hooks/post-receive
# Enter the code from the "post-receive" file (in this gist); save + quit
@supercid
supercid / install-pre-commit.sh
Created Aug 8, 2017 — forked from stefansundin/install-pre-commit.sh
Git pre-commit check to stop accidental commits to master and develop branches. There is also a variant with a core.whitespace check.
View install-pre-commit.sh
#!/bin/sh
# This gist contains pre-commit hooks to prevent you from commiting bad code or to the wrong branch.
# There are four variants that I have built:
# - pre-commit: stops commits to "master" and "develop" branches.
# - pre-commit-2: also includes a core.whitespace check.
# - pre-commit-3: the core.whitespace check and an EOF-newline-check.
# - pre-commit-4: only the core.whitespace check.
# Set desired version like this before installing:
# FILE=pre-commit
View keybase.md

Keybase proof

I hereby claim:

  • I am supercid on github.
  • I am supercid (https://keybase.io/supercid) on keybase.
  • I have a public key ASDfn2eux4enGBYnftuNim9XsHvKVPtOOrMp0hDbpzcCjwo

To claim this, I am signing this object:

@supercid
supercid / .zshrc
Last active Jun 12, 2019
My zshrc config
View .zshrc
export PATH=$HOME/bin:/usr/local/bin:$PATH
source <(antibody init)
PATH="/Users/alcidemar/Library/Python/2.7/bin:${PATH}"
# Path to your oh-my-zsh installation.
export ZSH=/Users/alcidemar/.oh-my-zsh
#export NVM_DIR="$HOME/.nvm"
#. "/usr/local/opt/nvm/nvm.sh"
# The shit above slows down the shell by 3 seconds! Load manually when needed
alias loadnvm=". /usr/local/opt/nvm/nvm.sh"
@supercid
supercid / shopware-one-liner.sh
Last active Mar 7, 2018
Shopware install one line
View shopware-one-liner.sh
git clone https://github.com/shopware/shopware.git
cd shopware
chmod -R 755 var
chmod -R 755 web
chmod -R 755 files
chmod -R 755 media
chmod -R 755 engine/Shopware/Plugins/Community
cd build/
ant configure
ant build-unit