Skip to content

Instantly share code, notes, and snippets.

Samuel samuelololol

Block or report user

Report or block samuelololol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test.py
def wrap_class_command(instance, method_name, *args, **kwargs):
return getattr(instance, method_name)(*args, **kwargs)
class ParallelDispatcher(object):
def __init__(self):
self.flow = []
self.jobs = []
def add_parallel_process(self, instance, method_name, *args, **kwargs):
job = (instance, method_name, args, kwargs)
@samuelololol
samuelololol / backup_guide.md
Created Nov 12, 2015
comics scrollers backup
View backup_guide.md

Linux Chromium

~/.config/chromium/Default/Local Extension Settings/mccpalfmlnjadfnojmphffidnbemnkec

OSX

~/Library/Application Support/Google/Chrome/Default/Local Extension Settings/mccpalfmlnjadfnojmphffidnbemnkec

@samuelololol
samuelololol / Makefile.am
Created Apr 9, 2014
add the line 25-30 to make nullprpl protocol plugin can be compiled by the command `make nullprpl.so`
View Makefile.am
EXTRA_DIST = \
Makefile.mingw \
README
pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
NULLSOURCES = nullprpl.c
AM_CFLAGS = $(st)
@samuelololol
samuelololol / new_gist_file.md
Created Sep 24, 2013
angularjs with yeoman
View new_gist_file.md

install yeoman

npm version 1.3.8 > 1.2.10

$ npm install -g yo
$ npm install -g grunt-cli bower

install angularjs from generator/scaffolding

@samuelololol
samuelololol / gist:6562545
Created Sep 14, 2013
fix gentoo preserved libs bugs for ffmpeg and oracle-jdk-bin
View gist:6562545

error message:

!!! existing preserved libs: 
>>> package: media-video/ffmpeg-1.0.7 
* - /usr/lib64/libavcodec.so.53 
* - /usr/lib64/libavcodec.so.53.61.100 
* used by /opt/oracle-jdk-bin-1.7.0.25/jre/lib/amd64/fxavcodecplugin-53.so (dev-java/oracle-jdk-bin-1.7.0.25) 
* - /usr/lib64/libavformat.so.53 
* - /usr/lib64/libavformat.so.53.32.100 
@samuelololol
samuelololol / gist:6547247
Last active Dec 22, 2015
setting nodejs environment on centos6.4 as a vmware vm
View gist:6547247
  1. edit MAC address
$ vi /etc/udev/rules.d/70-persistent-net.rules #ATTR{address}=="$MAC", NAME="eth0"
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0 #HWADDR=$MAC, onboot=yes
  1. edit IP address
$ ifconfig eth0 <ip> netmask <netmask>
$ route add default gw <gateway>
@samuelololol
samuelololol / gist:6463305
Last active Dec 22, 2015
install angularjs from yeoman
View gist:6463305
  1. install nvm
  2. install npm
  3. install yeoman bower grunt
  sudo npm install -g yo grunt-cli bower karma
  npm install -g generator-angular
  yo angular
  npm install
@samuelololol
samuelololol / gist:6453717
Created Sep 5, 2013
PostgresQL TroubleShooting
View gist:6453717

Problem

  1. connect psql with local account(pgsql user) without parameter -h localhost : success
  2. connect psql with local account(pgsql user) with parameter -h localhost : fail

Workaround

  1. use Ident Server
  2. or edit pg_hba.conf, replace ident with md5
@samuelololol
samuelololol / gist:6440354
Last active Dec 22, 2015
PostgreSQL on CentOS6
View gist:6440354
@samuelololol
samuelololol / gist:6433175
Last active Dec 22, 2015
weechat setting
View gist:6433175

Easy Steps to WeeChat

reference:

    /server add freenode chat.freenode.net/6697 -ssl
    /set irc.server.freenode.ssl_dhkey_size 1024
    /connect freenode
You can’t perform that action at this time.