Skip to content

Instantly share code, notes, and snippets.

View tofuseng's full-sized avatar

t͡ɕ∱ບຮɐດອ² tofuseng

  • 0x91EA74C6B1991B5B
View GitHub Profile
@tofuseng
tofuseng / delete-all-favorites
Created April 14, 2015 23:20
Delete all your favorites on twitter
unfavori = setInterval(function(){
$(".Grid[data-component-term='tweet']").each(function(){
$(".Grid[data-component-term='tweet']").find(".ProfileTweet-actionButtonUndo.u-linkClean.js-actionButton.js-actionFavorite.js-tooltip")[0].click();
$(".Grid[data-component-term='tweet']")[0].remove();
})
},500)
kontrol = setInterval(function(){
var tweetsys = $(".Grid[data-component-term='tweet']").length;
if(tweetsys < 50 || tweetsys == 50){
window.scrollTo(0,document.body.scrollBottom);
function BoBo(){this._init.apply(this,arguments)}BoBo.prototype=function(){return{_init:function(e,t){this.imgSrc=e,this.container=document.getElementById(t);if(!this.container){alert("canvas容器不存在!");return}this.shakeAngle=0,this.shakeRange=.45,this.shakeRangeDelay=.995,this.shakeAngleSpeed=.65,this.shakeAngleDelay=.995,this.interval=40,this.controlRects=[]},_getPointRGB:function(e,t){e=Math.floor(e),t=Math.floor(t);var n=this.imageData.data,r=[],s=(t*this.canvasWidth+e)*4;for(i=s;i<s+3;i++)r.push(n[i]);return r},_setRectPointRGB:function(e,t,n,r){t=Math.floor(t),n=Math.floor(n);var i=this.rectImageData[e],s=this.controlRects[e],o=s.width,t=t-s.x,n=n-s.y,u=(n*o+t)*4;i.data[u]=r[0],i.data[u+1]=r[1],i.data[u+2]=r[2],i.data[u+3]=255},_makeRectShake:function(e,t){var n=this.controlRects[e],r=n.width*.5,i=n.height*.5,s={x:n.x+r,y:n.y+i},o=Math.PI*2,u=Math.PI/(2*(r+i));for(var a=0;a<o;a+=u){var f={x:r*Math.cos(a),y:i*Math.sin(a)},l={x:t.x-s.x,y:t.y-s.y},c={x:f.x-l.x,y:f.y-l.y},h=1/Math.max(Math.abs(c.x),Math.abs(c.
@tofuseng
tofuseng / file_command_content_type_detector.rb
Created May 6, 2015 11:59
create an initializer to override Paperclip's classes file_command_content_type_detector.rb and media_type_spoof_detector.rb
module Paperclip
class FileCommandContentTypeDetector
SENSIBLE_DEFAULT = "application/octet-stream"
def initialize(filename)
@filename = filename
end
def detect
type_from_file_command
@tofuseng
tofuseng / media_type_spoof_detector.rb
Created May 6, 2015 12:00
create an initializer to override Paperclip's classes file_command_content_type_detector.rb and media_type_spoof_detector.rb
module Paperclip
class MediaTypeSpoofDetector
def self.using(file, name)
new(file, name)
end
def initialize(file, name)
@file = file
@name = name
end
@tofuseng
tofuseng / delete_fav_tweet
Last active September 16, 2015 08:15
Bulk mass destroy twitter favorites using nodejs
/**
* delete_fav_tweet
*
* @class delete_fav_tweet
* @constructor
*/
/**
* Method to delete_fav_tweet
*

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@tofuseng
tofuseng / switching-to-contracting-uk.md
Last active September 9, 2015 06:32
switching-to-contracting-uk

Becoming a contractor programmer in the UK

https://github.com/tadast/switching-to-contracting-uk

After delaying it for more than a year I have finally made the big move from a stable full time job to the dynamic world of contracting. One of the biggest reasons for delaying the move was not knowing the technicalities of getting all the machinery up and running. The main goal of this document is to provide an easily replicable process you can follow to become a contractor. I can not claim it is the best process to follow, but it has worked for me and other people who have advised me. Use my advice on your own responsibility.

@tofuseng
tofuseng / bookmarklist.md
Created October 19, 2015 00:52
wtf-stuff

#summary Bookmarks List = Hacker Media =

== Blogs Worth It: == What the title says. There are a LOT of pentesting blogs, these are the ones i monitor constantly and value in the actual day to day testing work.

* http://carnal0wnage.blogspot.com/
* http://www.mcgrewsecurity.com/
* http://www.gnucitizen.org/blog/
@tofuseng
tofuseng / Getting_started.md
Created November 13, 2015 22:04
Getting started in information security…. notes to a student

http://blog.pentestify.com/2014/03/07/getting-started-in-security-a-message-to-a-student/

Recently had a college student reach out for advice, and thought i’d share with the class:

My biggest issue with my current education is the broad scale and lack of clear direction on how to achieve my goals. I know that I am very interested in penetration testing. Ethical hacking in general is a very big interest of mine. But as for what area of security, I’m not even sure what the options are.

Cool – sounds like the biggest thing is to explore your options, and decide on a direction knowing full well this may change as you learn more.

@tofuseng
tofuseng / gist:67b07d84def662989b51
Created November 14, 2015 19:29 — forked from david415/gist:120f157f62d20b11e39f
secret onion git http repo! fuck github. no masters. no sys admins. only the secret police know how cool i am.
virtualenv virtenv-txtorcon
. ./virtenv-txtorcon/bin/activate
pip install txtorcon
export project=myproject
export secret=`pwgen 64`
mkdir -p public_html/$secret
cp -a $project public_html/$secret
touch public_html/index.html