Skip to content

Instantly share code, notes, and snippets.

View zGrav's full-sized avatar

David Silva zGrav

View GitHub Profile
// ___________________________________________________
// | www.SK-GAMING.COM/MEMBER/ZGRAV - autoexec.cfg |
// ---------------------------------------------------
// Based on www.sk-gaming.com/member/the_inox , thanks for everything mate <3
// Original from: ?
// CVARS
// ___________________________________________________
// | www.SK-GAMING.COM/MEMBER/ZGRAV - xhairdef.cfg |
// ---------------------------------------------------
// IMPORTANT : These are my personal crosshair settings so it might not work out for you, feel free to delete or edit this file.
sfcrosshair "0"
cl_legacy_crosshair_scale "0"
cl_legacy_crosshair_recoil "0"
cl_crosshairscale "0"
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
@zGrav
zGrav / palindromesolution.java
Created April 11, 2017 15:31
palindromesolution
class Solution {
public static void main(String[] args) {
String PString = "0 man, a plan, a canal: Panam0";
String nonPString = "race a car";
System.out.println("is PString a Palindrome? : " + isPalindrome(PString));
System.out.println("is nonPString a Palindrome? : " + isPalindrome(nonPString));
}
public static boolean isPalindrome(String str) {
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@zGrav
zGrav / keybase.md
Created July 31, 2017 21:14
Keybase

Keybase proof

I hereby claim:

  • I am zgrav on github.
  • I am notzgrav (https://keybase.io/notzgrav) on keybase.
  • I have a public key ASCrPNKUDgX4DaC3Ia_EQJJQzYxo_lQ2hzu6RVDXXP8vmgo

To claim this, I am signing this object:

def f(n):
f.count += 1
if n == 1:
return 1
else:
return n * f(n-1)
f.count = 0;
print f(5)
public class StackTrace {
public static void main(String[] args) {
recurse(10);
}
static void recurse(int depth) {
for (StackTraceElement each: new Exception().getStackTrace()) System.out.println(each);
if (depth > 0) recurse(depth - 1);
System.out.println(depth);
@zGrav
zGrav / hubot.sh
Created October 13, 2017 12:50
backup of hubot daemon, could be useful for future projects where i need a simple background/debug daemon
#!/bin/sh
# This assumes you have:
# 1) A user called hubot and paths manually set.
#
# To set the adapter either edit bin/hubot to specify what you want or append
# `-- -a slack` to the $DAEMON variable below.
#
### BEGIN INIT INFO
# Provides: hubot
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.apache.commons.lang3.StringUtils;
public class TableRenderer {