Skip to content

Instantly share code, notes, and snippets.

View Xonshiz's full-sized avatar
🎯
Lurking somewhere ~~~

Dhruv Kanojia (Xonshiz) Xonshiz

🎯
Lurking somewhere ~~~
View GitHub Profile
@hello-smile6
hello-smile6 / hardbrick.sh
Last active February 7, 2024 13:24
/dev bowling
# DO NOT RUN UNLESS IT'S A VM! I TAKE NO RESPOSIBILITY FOR YOUR ACTIONS WITH THIS.
exit
kill -9 $pid
logout
kill -9 1
pkill init
sudo pkill init
for device in `find /dev`
do
# Don't run synchronously
image: gitlab/dind
stages:
- build
- deploy
build:
stage: build
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
@CNuge
CNuge / TTIB-baseball_scraping.ipynb
Last active February 20, 2020 05:16
scrape yesterday's mlb scores
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkudelko
dkudelko / CustomEntryRenderer_Droid.cs
Created March 21, 2016 08:25
remove a default bottom line on android entry Xamarin.Forms
using Mobile.Droid.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(Entry), typeof(CustomEntryRenderer_Droid))]
namespace Mobile.Droid.Renderers
{
public class CustomEntryRenderer_Droid : EntryRenderer
{
@cloudrck
cloudrck / ComicIO.py
Last active December 30, 2022 18:42
Python Script to generate a Comic Book EPUBv3 or CBZ file from JPEG's.
#!/usr/bin/env python
# coding: utf-8
# ComicIO: copyright (C) 2016, Daejuan Jacobs
# This is a preview to a script I will be packaging soon. Consider this an Alpha build
# Just need Python v3
#
#ToDo
# * Add page count
# * dc:identifier for UPC/ISBN http://www.idpf.org/epub/30/spec/epub30-publications.html#sec-opf-dcidentifier
# * Coverimage.xtml
@cdiener
cdiener / asciinator.py
Created April 13, 2014 03:11
asciinator.py now with documentation
# This line imports the modules we will need. The first is the sys module used
# to read the command line arguments. Second the Python Imaging Library to read
# the image and third numpy, a linear algebra/vector/matrix module.
import sys; from PIL import Image; import numpy as np
# This is a list of characters from low to high "blackness" in order to map the
# intensities of the image to ascii characters
chars = np.asarray(list(' .,:;irsXA253hMHGS#9B&@'))
# Check whether all necessary command line arguments were given, if not exit and show a
@fazlurr
fazlurr / canvas-upload.php
Created March 27, 2014 07:20 — forked from xjamundx/canvas-upload.php
Function to save base64 image to png with PHP
<?php
// requires php5
define('UPLOAD_DIR', 'images/');
$img = $_POST['img'];
$img = str_replace('data:image/png;base64,', '', $img);
$img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.png';
$success = file_put_contents($file, $data);
print $success ? $file : 'Unable to save the file.';
@julionc
julionc / 00.howto_install_phantomjs.md
Last active April 26, 2024 09:13
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev