Skip to content

Instantly share code, notes, and snippets.

View miphilomath's full-sized avatar
💭
Reading -> Writing -> Learning

Mohit Bansal (Philomath) miphilomath

💭
Reading -> Writing -> Learning
View GitHub Profile
@panr
panr / config.yml
Last active August 13, 2019 14:42
YAML configf for Hugo Terminal Theme
baseUrl: /
languageCode: en-us
theme: terminal
paginate: 5
params:
# dir name of your blog content (default is `content/posts`)
contentTypeName: posts
# ["orange", "blue", "red", "green", "pink"]
themeColor: orange

Prepare

export OBS_USERNAME=M0ses

APPImage

Create new project

Create temporary config file

@hardfire
hardfire / README.MD
Last active August 12, 2021 03:34
using cgroups to limit browser memory+cpu usage
  1. cgconfig.conf - that's where you create the control group /etc/
  2. cgrules.conf - that's where you add binaries to that specific control group /etc/
  3. cgconf - that's the init script i use because its not available on ubuntu. It might be available for your OS in the package manager. I took the startup script from http://askubuntu.com/questions/836469/install-cgconfig-in-ubuntu-16-04 - /etc/init.d/

Notes

Use the following steps to test what you have without the

  • cgconfigparser -l /etc/cgconfig.conf - to add/register your control group to the system
  • cgrulesengd - sends the binary-cgroup binding rules.
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@cirrusUK
cirrusUK / weechat
Last active April 27, 2024 06:32
my weechat configs
/server add Dalnet irc.dal.net/6697
/set irc.server.Dalnet.autoconnect on
/set irc.server.Dalnet.autojoin "#Scotland,#soccer,#cafechat,#ALLNITECAFE,#androidirc,#apple,#bsd,#linux"
/set irc.server.Dalnet.username "cirrus"
/server add geekshed irc.geekshed.net/6667
/server del freenode
/mouse enable|disable|toggle [<delay>]
@juanje
juanje / Description.md
Last active November 30, 2023 19:29
Limit Chrome from eating all the memory and CPU

I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.

As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:

group browsers {
    cpu {
#       Set the relative share of CPU resources equal to 25%
        cpu.shares = "256";
 }
@gitaarik
gitaarik / git_submodules.md
Last active May 4, 2024 11:10
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@chrislkeller
chrislkeller / backup-requirements.sh
Last active April 12, 2021 10:09
A couple quick bash scripts so I can keep virtualenvs somewhat consistent across machines. backup-requirements.sh exports requirements files for each virtualenv, names the files for the virtualenv and sends them to a date-versioned directory. install-requirements.sh loops through a directory of requirements files and checks to see if a virtualen…
#!/bin/bash
# grab the virtualenvwrapper settings
export WORKON_HOME=$HOME/.virtualenvs
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
# the location of your virtualenv wrapper shell script may differ
source /usr/local/share/python/virtualenvwrapper.sh