Skip to content

Instantly share code, notes, and snippets.

View rmuhamedgaliev's full-sized avatar
🐒
Work hard!

Rinat Muhamedgaliev rmuhamedgaliev

🐒
Work hard!
View GitHub Profile
@select
select / box.js
Last active November 9, 2016 15:46
Express Mongo REST API in ES6 with co and generators mongoose and lodash
'use strict';
let router = require('express').Router();
const co = require('co');
const mongoose = require('mongoose');
const Box = mongoose.model('Box');
const _ = require('lodash');
// ---
router.route('/')
@kingbin
kingbin / gist:9435292
Last active August 19, 2024 19:53
Manually Start/Stop PostgresSQL on Mac
# Stop PostgreSQL from auto starting
sudo launchctl unload -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist
# Enable PostgreSQL to auto start
sudo launchctl load -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist
# Start postgres
$ sudo su postgres
Password:
bash-3.2$ pg_ctl -D /Library/PostgreSQL/9.3/data/ start
@erwanjegouzo
erwanjegouzo / gist:5903791
Last active September 5, 2024 01:39
Dropbox sync
#DROPBOX SYNCING
#==============
# bash_profile
rm -rf .bash_profile
ln -s ~/Dropbox/.bash_profile .bash_profile
# Sublime 2 Preferences
cd ~/Library/Application\ Support/Sublime\ Text\ 2/
ln -s ~/Dropbox/appdata/sublime/Installed\ Packages ./Installed\ Packages
@fernandoaleman
fernandoaleman / Linux Static IP
Created March 23, 2012 16:20
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@avalonalex
avalonalex / RSA.py
Last active March 6, 2021 10:46
A implementation of RSA public key encryption algorithms in python, this implementation is for educational purpose, and is not intended for real world use. Hope any one want to do computation like (a^b mode n) effectively find it useful.
#!/usr/bin/env python
import argparse
import copy
import math
import pickle
import random
from itertools import combinations
@tsabat
tsabat / zsh.md
Last active October 16, 2024 14:43
Getting oh-my-zsh to work in Ubuntu