Skip to content

Instantly share code, notes, and snippets.

View giver's full-sized avatar

Tanin Srivaraphong giver

View GitHub Profile
@giver
giver / annoying.js
Created September 13, 2011 04:35 — forked from Kilian/annoying.js
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@giver
giver / ubuntu_rails_install.rb
Created February 2, 2012 10:55 — forked from JangoSteve/ubuntu_rails_install.rb
Capistrano script to install Ruby, RVM, Rails in ubuntu (modified from deploy.rb scripts)
namespace :ubuntu do
desc "Setup Environment"
task :setup_env, :roles => :app do
update_apt_get
install_dev_tools
install_git
install_subversion
install_sqlite3
# Install and setup RVM instead of old Rails stack
#install_rails_stack
@giver
giver / sorted_array.rb
Last active December 21, 2015 16:09 — forked from ryanlecompte/sorted_array.rb
Implement sorted array that always sort when has new data inserted.
require 'delegate'
# SortedArray is backed by a binary search when inserting elements
# via #<< as well as querying for an element with #include?
#
# Example:
# a = SortedArray.new
# 10.times { a << rand(100) }
# puts a # => [3, 24, 30, 40, 42, 43, 49, 67, 81, 88]
# a.include?(49) # => true
@giver
giver / 0_reuse_code.js
Created June 28, 2016 02:53
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
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@giver
giver / nerd_fonts.md
Created March 17, 2024 08:45 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]