Skip to content

Instantly share code, notes, and snippets.

View sudogem's full-sized avatar

r_man sudogem

View GitHub Profile
@sudogem
sudogem / my_log.rb
Last active March 25, 2024 08:18
Create custom log file
#
# Create a file my_log.rb in app/models
# Copy & paste the code below in my_log.rb
class MyLog
class << self
def debug(msg)
File.open("log/logs.txt", "a+") {
|file|
file.write(msg)
file.write("\n")
@sudogem
sudogem / stylebot_philstocks-marketInfo-darkmode.css
Last active February 24, 2022 09:00
(DARK MODE)Philstocks Customized Theme for MarketInfo page
/**
* Philstocks Customized Theme for MarketInfo page
* https://my.philstocks.ph/OneScreen/MarketInfo.cshtml
**/
.content {
background-color: #000;
}
.maTableSymbol {
@sudogem
sudogem / stylebot_philstocks-marketInfo.css
Last active June 23, 2021 06:06
Philstocks Customized CSS Theme for Stylebot - a chrome/firefox addon
/**
* Philstocks Customized Theme for MarketInfo page
* https://my.philstocks.ph/OneScreen/MarketInfo.cshtml
**/
.gaTableSymbol,
.maTableSymbol,
.indicesTitle {
font-size: 0.99em;
@sudogem
sudogem / gist:c3e9d901f22d4c759092dde0a7e937e6
Created July 18, 2020 08:45
clrlogs - empty log files in log/ folder
## In your clrlogs.sh file, add this code
## create a symlink to /usr/local/bin
# <app-root> / log
# check if log folder is exist.
if [ -d "log" ]
then
echo "[clrlogs.sh] log folder found!"
for file in log/*.log
do
@sudogem
sudogem / dropbox.sh
Created June 6, 2018 13:53
start dropbox
dropbox stop && dbus-launch dropbox start
@sudogem
sudogem / tradingview.js
Last active September 20, 2023 14:07
This script will hide the TradingView logo or any custom logo
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.investagrams.com/Chart/PSE:*
// @icon https://www.google.com/s2/favicons?domain=investagrams.com
// @grant none
// ==/UserScript==
@sudogem
sudogem / .bashrc
Last active February 27, 2024 16:07
Create a .bashrc file(if not exist) using the command: $ vi ~/.bashrc then update it. Once updated we run this command: $ source ~/.bashrc
## Add git branch name in Terminal
force_color_prompt=yes
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
## export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] >\n$ "
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[33m\]\$(parse_git_branch)\[\033[00m\] >\n$ "
## Git shortcuts
alias gitlogtree="git log -n 10 --graph --decorate -30 --all --date-order --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%C(cyan)%h%Creset %C(black bold)%ad%Creset%C(auto)%d %s'"
@sudogem
sudogem / basic-reactjs.js
Last active September 13, 2017 02:42
hings to remember in ReactJS
const greeting = <h1>hello world!</h1>
// If you have JSX code that spans across multiple lines,
// you can wrap it in ( and ) brackets, as follows:
const greeting = (
<h1>
hello world!
</h1>
)
@sudogem
sudogem / es2015.js
Last active September 19, 2017 09:37
ES 2015(ES 6) Syntax
// Differences of ES5 and ES2015(formerly known as ES6)
//====================================================
// ES5
var braveNewWorld = function( world ) {
console.log( "Welcome to" + world )
};
// ES2015: Using Arrow Functions, let, template strings
let braveNewWorld = ( world ) => {
console.log(`Welcome to ${world}`);
{
"color_scheme": "Packages/Theme - Superflat Adventures/Adventure Time.tmTheme",
"color_scheme_r1": "Packages/Agila Theme/Agila Neon Monocyanide.tmTheme",
"color_scheme_r3": "Packages/Agila Theme/Agila Origin Oceanic Next.tmTheme",
"draw_white_space": "all",
"font_size": 11,
"ignored_packages":
[
"Vintage"
],