Skip to content

Instantly share code, notes, and snippets.

View ooooak's full-sized avatar
🏠
Working from home

Akshay ooooak

🏠
Working from home
View GitHub Profile
@ooooak
ooooak / gist:115dda2f5d38b27da075
Created May 6, 2015 10:15
revolution: stop video on next slide
(function(){
if (typeof revapi2 === 'undefined'){
return;
}
revapi2.bind("revolution.slide.onloaded",function (e,data) {
revapi2.bind("revolution.slide.onchange",function (e,data) {
var iframes = $('.rev_slider > ul > li iframe');
$('.rev_slider > ul > li iframe').each(function(index, el) {
mp_humanteam any;
bot_kick;
mp_warmuptime 333333331;
bot_knives_only 1;
sv_infinite_ammo 1;
mp_autoteambalance 0;
mp_limitteams 999;
unbindall
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "a" "+moveleft"
bind "b" "buymenu"
bind "c" "slot8"
bind "d" "+moveright"
@ooooak
ooooak / main.js
Created February 7, 2017 10:30
read laravel .env in node
var fs = require('fs');
var path = require('path');
function readEnv() {}
readEnv.prototype.get = function(index, other) {
var root = __dirname.replace('test' + path.sep + 'Libs', '');
var contents = fs.readFileSync(root + '.env', 'utf8').split("\n");
@ooooak
ooooak / gist:8630906fba860b91701b06cddbe880c1
Last active November 26, 2016 13:15
my crosshair for 1280 x 960
cl_crosshairstyle 2;
cl_crosshairalpha 255;
cl_crosshairdot 0;
cl_crosshairsize 2;
cl_crosshairthickness 0.5
cl_crosshairgap 3;
// green
cl_crosshaircolor 1;
@ooooak
ooooak / s.py
Created November 13, 2015 15:02
def index(request):
if request.method == 'GET':
return render(request,'task/index.html')
elif request.method == 'POST':
t = request.POST.get("task", "")
fb = get_fb(t) ...
ig = get_insta(t)
tw = get_twitter(t)
gp = get_gplus(t)
result = True
#[derive(Debug, Clone, Copy)]
pub struct User<'a>{
pub token: &'a Vec<String>,
pub look: &'a usize,
}
impl<'a> User<'a>{
pub fn display(self){
println!("{:?}", self);
#[derive(Debug, Clone, Copy)]
pub struct User<'a>{
pub Token: &'a Vec<String>,
pub look: &'a usize,
}
impl<'a> User<'a>{
pub fn display(u: User){
println!("{:?}", u);
}
@ooooak
ooooak / gist:a75c3611663932be92f1
Created October 17, 2015 13:49
resize image in python [linux only]
import os
import glob
path = '~/send/*.JPG'
files = glob.glob(path)
for f in files:
os.system('convert -resize 24% ' + f + ' ' + f.replace('/send/', '/send/new/'))
https://www.youtube.com/watch?v=bxjw_8RpoNI