Skip to content

Instantly share code, notes, and snippets.

View dolftax's full-sized avatar

Jai Pradeesh dolftax

View GitHub Profile
@dolftax
dolftax / 0_reuse_code.js
Created November 17, 2015 18:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dolftax
dolftax / select_element.js
Created October 24, 2015 02:18
jQuery isn't a solution for everything
var $ = function (el) {
return document.querySelector(el);
};
var $$ = function (el) {
return document.querySelectorAll(el);
};
@dolftax
dolftax / sublime.conf
Last active March 17, 2016 13:19
Sublime text 3 custom conf
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_inactive_tabs": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"font_face": "Hack",
"font_options":
[
@dolftax
dolftax / fiush-iptables.sh
Created May 29, 2015 16:30
Flushing iptables
#!/bin/sh
echo "Flushing iptables rules..."
sleep 1
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
@dolftax
dolftax / steam-install
Created May 4, 2015 16:18
sTeam Installation steps
1.) install libxml2 version 2.8.0 (not latest)
2.) install libxslt version 1.1.28 (latest, 16/03/2015)
3.) install libmysqlclient-dev mysql-server mysql-client
---IMPORTANT - MAKE SURE ALL PREVIOUS STEPS ARE DONE BEFORE configure/make THE PIKE IN NEXT STEP, otherwise the mysql 2 option error will come ---
4.) install pike version 7.8.866
---all use ./configure, make , sudo make install-------------------
5.) Get the sTeam 2.9 code by, git clone http://github.com/ekita/sTeam.git
6.) Enter command, git checkout steam-2.9-source
7.)./build
@dolftax
dolftax / font-installation
Last active August 29, 2015 14:20
Font Installation - Fedora
Ref - https://ask.fedoraproject.org/en/question/46706/how-to-install-different-type-of-fonts/
Step 1. Download whatever font you want. You can just save the ttf file or the whole zip file. I mostly use dafont.com , but any font website should work.
Step 2. Remember the path of where you saved it, and open a terminal. If the file is a zip file, use this command: unzip [FILE].
Step 3. Find the .ttf file in the download. If you unzipped the zip, use ls to find the name of the ttf file.
Step 4. Make a .fonts directory in your home directory, by using mkdir $HOME/.fonts. Then, move that file to the .fonts directory you created by using mv [TTF FILE] $HOME/.fonts. If you wish to install for the whole system, use sudo mv [TTF FILE] /usr/share/fonts.
@dolftax
dolftax / ubuntu-fonts.sh
Created April 30, 2015 16:37
Ubuntu Font installation in Fedora
wget "http://blog.andreas-haerter.com/_export/code/2011/07/18/install-ubuntufonts-fedora.sh?codeblock=1" -O "/tmp/install-ubuntufonts-fedora.sh"
chmod a+rx "/tmp/install-ubuntufonts-fedora.sh"
su -c "/tmp/install-ubuntufonts-fedora.sh"
====
#!/bin/bash
################################################################################
# Ubuntu fonts installation helper for Fedora Linux
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/opt/sublime_text_3/sublime_text
Icon=/opt/sublime_text_3/Icon/128x128/sublime-text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@dolftax
dolftax / fossasia-log
Last active August 29, 2015 14:19
#fossasia IRC log / sTeam Web Interface Rewrite
<eMBee> note that there are also containers, which are also kind of like folders, but i want to use tem for special things only, like a multi-part document (eg a html file and images) or a multi-language document. (one file per language) or other multi-part (one file per chapter for example)
<dolftax> Special Room for this feature?
<eMBee> a key difference between rooms and containers is that a user can enter a room, but not a container. in that sense rooms are moe like directories, because you can cd to a directory
<eMBee> it's not a special room, it is a container in sTeam terms
<eMBee> sTeam has two things that can contain files: rooms and containers
<dolftax> Why can't a user enter container, if he got access to it?
<eMBee> because sTeam is implementedthat way. you can see what's inside a container, and get all files (and subcontainers) but you can't enter it
<dolftax> I couldn't get that. Please clarify
<eMBee> do you have a steam server running?
<dolftax> Yes.
@dolftax
dolftax / tarako_flash
Created October 29, 2014 18:10
Instructions to set-up tarako device
===== Install adb =====
Open a terminal window and type:
sudo apt-get install android-tools-adb android-tools-fastboot
===== Configure usb =====
Then type:
sudo nano /etc/udev/rules.d/51-android.rules
And enter these lines into the file (note: this adds rules for keon, ZTE Open, and tarako):
SUBSYSTEM==”usb”, ATTR{idVendor}==”05c6″, ATTR{idProduct}==”8013″, MODE=”0666″
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1782", MODE="0666"