Skip to content

Instantly share code, notes, and snippets.

View 2bj's full-sized avatar
🏠
Working from home

Bakyt 2bj

🏠
Working from home
View GitHub Profile
@2bj
2bj / fix_youtube_titles.js
Last active December 30, 2015 22:13
Super.kg media (audio/video) grabber.
// fix youtube video title after/while upload (http://www.youtube.com/upload)
$x("//input[contains(@class, 'video-settings-title')]").forEach(function(el,i){
if(el.value.indexOf(" ")!= -1){
el.value = el.value.replace(' ', ' - ')
}
});
@rob-brown
rob-brown / RBSimpleSingleton.h
Created July 31, 2011 02:28
A singleton that can be safely subclassed to reduce code duplication.
//
// RBSimpleSingleton.h
//
// Copyright (c) 2011 Robert Brown
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@shadowhand
shadowhand / dbs.php
Created December 16, 2011 17:40
MySQL Server Migation
<?php
$host = 'remotehost.com';
$servers = array(
'db/username' => 'password',
);
foreach ($servers as $db => $pw)
{
@skeeet
skeeet / xcode_ramdisk.sh
Created April 12, 2012 13:35 — forked from MaximKeegan/xcode_ramdisk.sh
Create a RAM disk for using with XCode
#!/bin/sh
# Create a RAM disk with same perms as mountpoint
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions
# Usage: sudo ./xcode_ramdisk.sh start
USERNAME=$(logname)
TMP_DIR="/private/tmp"
RUN_DIR="/var/run"
SYS_CACHES_DIR="/Library/Caches"
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pepelsbey
pepelsbey / wishlist.md
Last active October 8, 2015 14:58
Список желаний

Список желаний

Ведётся для друзей (что тебе подарить?) и для себя (куда бы потратить деньги?). Если вы хотите меня порадовать, то можете купить что-нибудь из списка ниже или просто перевести мне денег в качестве комплимента. Перед тем, как что-либо купить, сообщите мне о своём намерении, чтобы не было пересечений в сезонные подарочные периоды. Исключение составляет только список «Прочее».

Книги

@2bj
2bj / Custom.css
Created October 7, 2012 22:47 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@2bj
2bj / appify
Created October 7, 2012 22:54 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@return1
return1 / trim_enabler.txt
Last active August 25, 2023 02:59
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@2bj
2bj / gist:4175001
Created November 30, 2012 10:23
58 книг
Всем известный мультяшный персонаж Mr. Freeman составил список книг к прочтению. Хочешь мыслить шире, читай.
1.Данте Алигьери «Божественная комедия»
2.Аристотель «Политика»
3.Александр Афанасьев «Русские заветные сказки»
4.Ричард Бах «Чайка по имени Джонатан Ливингстон»
5.Александр Беляев «Продавец воздуха»
6.Энтон Бёрджесс «Заводной апельсин»
7.Михаил Булгаков «Великий канцлер»
8.Михаил Булгаков «Мастер и Маргарита» ☑