Skip to content

Instantly share code, notes, and snippets.

@nightfox
nightfox / autoexec.cfg
Created August 28, 2017 09:59
CS:GO config
// nightf0x's CS:GO config, heavily borrowed from https://gist.github.com/nickbudi/3916475
rate "786432"
cl_cmdrate "128"
cl_updaterate "128"
cl_interp "0.0"
cl_interp_ratio "1"
cl_interpolate "1"
cl_lagcompensation "1"
net_client_steamdatagram_enable_override "1" // SDR beta
machine:
node:
version: 7.0.0
environment:
BROCCOLI_PERSISTENT_FILTER_CACHE_ROOT: "/home/ubuntu/embercom/persisted-cache"
YARN_VERSION: 0.17.8
PATH: "${PATH}:${HOME}/.yarn/bin"
dependencies:
override:
- yarn global add bower && yarn
DisplayedDataAttribute.where.not(sort_by: nil).find_in_batches(batch_size: 100).each do |batch|
batch.each do |attribute|
attribute.create_or_update_sort_attribute
end
end
::Recruit::TestInvite.where('created_at > ?', Time.now - 7.days).each do |test_invite|
test_invite.candidates_data.each do |candidate|
candidate.symbolize_keys!
next unless candidate[:name].presence
test_user = ::Recruit::TestUser.where(tid:test_invite.tid, email: candidate[:email]).last
next if test_user.blank?
@nightfox
nightfox / Redis as a Service
Last active March 10, 2019 01:12
Installing Redis Server as a service
sudo vim /etc/redis/redis.conf
Change the following lines
daemonize yes
bind 127.0.0.1
dir /var/lib/redis
wget https://gist.github.com/nightfox/8153193/raw/553c375424866e8d0d0bd5b48d23578c93031bce/redis-server
@nightfox
nightfox / Redis as a Service
Created December 27, 2013 22:15
Installing Redis Server as a service
sudo vim /etc/redis/redis.conf
Change the following lines
daemonize yes
bind 127.0.0.1
dir /var/lib/redis
wget https://gist.github.com/nightfox/8153193/raw/553c375424866e8d0d0bd5b48d23578c93031bce/redis-server
@nightfox
nightfox / redis-server
Last active January 1, 2016 13:48
init script for redis ! :D Copy this file to /etc/init.d/redis-server sudo chmod +x /etc/init.d/redis-server
#!/bin/sh
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN