Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Akshaydeep Giri ooooak

🏠
Working from home
View GitHub Profile
View To study
> https://www.reddit.com/r/Clojure/comments/f0b9bk/what_would_you_consider_to_be_the_hardest_thing/fgszcq0/
Learning the "vocabulary" ( partion-all, interpose, nthnext, nthrest, take-nth...)
def rabbits
[{:name "Fluffy" :color :white :size :large}
{:name "Chocolate" :color :brown :size :medium}
View gist:0e244624ace6f80594cf242e03de6cd0
https://clojure.org/guides/deps_and_cli#local_jar
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
@ooooak
ooooak / func.php
Created Sep 14, 2015
laravel bcrypt function
View func.php
<?php
function bcrypt($password)
{
$hash = password_hash($password, PASSWORD_BCRYPT, ['cost' => 10]);
if ($hash === false)
{
throw new RuntimeException('Bcrypt hashing not supported.');
}
@ooooak
ooooak / life_saver.php
Created Feb 19, 2018
[laravel] Truncate tables with foreign key
View life_saver.php
<?php
\DB::statement('SET FOREIGN_KEY_CHECKS=0');
App\Product::truncate();
App\ProductCategory::truncate();
App\ProductBrand::truncate();
App\Attribute::truncate();
App\Review::truncate();
\DB::statement('SET FOREIGN_KEY_CHECKS=1');
@ooooak
ooooak / read-csv.php
Created Feb 16, 2018
read csv in php
View read-csv.php
<?php
$path = '/tmp/test.csv';
$header = [];
$items = [];
foreach (array_map('str_getcsv', file($path)) as $key => $row) {
if ($key == 0){
$header = $row;
}else{
try {
@ooooak
ooooak / main.cpp
Created Jan 30, 2018
keylogger in cpp
View main.cpp
#include <iostream>
#include <Windows.h>
#include <fstream>
#include <string>
#include <ctime>
#include <vector>
#include <iterator>
using namespace std;
@ooooak
ooooak / gist:115dda2f5d38b27da075
Created May 6, 2015
revolution: stop video on next slide
View gist:115dda2f5d38b27da075
(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) {
View 1vs1 cs go
mp_humanteam any;
bot_kick;
mp_warmuptime 333333331;
bot_knives_only 1;
sv_infinite_ammo 1;
mp_autoteambalance 0;
mp_limitteams 999;