Skip to content

Instantly share code, notes, and snippets.

View sasikanth513's full-sized avatar
👨‍💻
Coding

Sasikanth sasikanth513

👨‍💻
Coding
View GitHub Profile
@sasikanth513
sasikanth513 / git-tips.js
Last active June 16, 2023 13:53
Git Tips
[
{
"Author": "stackoverflow",
"url": "https://stackoverflow.com",
"format": "html",
"tips": [
{
"title": "How to undo the most recent commits in Git?",
"body": "<h3>Undo a commit and redo</h3>\n\n<pre class=\"lang-sh prettyprint-override\"><code>$ git commit -m \"Something terribly misguided\" (1)\n$ git reset HEAD~ (2)\n&lt;&lt; edit files as necessary &gt;&gt; (3)\n$ git add ... (4)\n$ git commit -c ORIG_HEAD (5)\n</code></pre>\n\n<ol>\n<li>This is what you want to undo</li>\n<li>This leaves your working tree (the state of your files on disk) unchanged but undoes the commit and leaves the changes you committed unstaged (so they'll appear as \"Changes not staged for commit\" in <code>git status</code>, and you'll need to add them again before committing). If you <em>only</em> want to <em>add</em> more chan
@sasikanth513
sasikanth513 / paddle-revenue.js
Created January 20, 2023 02:38 — forked from trungdq88/paddle-revenue.js
A scriptable's script to get Paddle revenue from multiple accounts using puppeteer.
/*
RUN THE SCRIPT BY YOURSELF:
- Run `node paddle-revenue.js` on your server and let it run 24/7.
- Access the API at http://your_server_ip:8175/ (JSON)
HOSTED VERSION:
If you don't want to run the script by your own, you can use the
hosted version. The price is $5 per month per Paddle account.
Here is how:
AllCourses = [
{
url: "devops",
title: 'DEVOPS',
duartion: '(45 hours - 45 days)',
courseHighlights: [
"Ideal for those who are working on build and release system administration and data centers.",
"Laser focused classroom realtime trainings.",
"Placement services."
],
Template.registerHelper('tdd', function(prop) {
const t = Template.instance();
return t.dataDict.get(prop);
});
<form>
.
.
{{#if tdd 'submitingCreateUserForm'}}
<button type="submit" class="btn btn-primary" disabled="true">
<i class="fa fa-spin fa-spinner"></i>
Saving...
</button>
{{else}}
import { Meteor } from "meteor/meteor";
Template.mainLayout.onCreated(function () {
const self = this;
self.dataDict = new ReactiveDict();
self.dataDict.set('submitingCreateUserForm', false);
})
"submit #createUserForm": function(e, t) {
// before calling meteor method
@sasikanth513
sasikanth513 / methods.js
Created November 19, 2018 06:03
Peerlyst-search
import { Meteor } from "meteor/meteor";
import { _ } from "meteor/underscore";
import { ValidatedMethod } from "meteor/mdg:validated-method";
import { SimpleSchema } from "meteor/aldeed:simple-schema";
import { DDPRateLimiter } from "meteor/ddp-rate-limiter";
import {
shouldSearchExactWord,
removeQuotesFromWord,
getRegexStringForWordsMatch,
} from "./helpers.js";
@sasikanth513
sasikanth513 / meteor-packages.json
Created November 11, 2018 07:50
meteor-packages
This file has been truncated, but you can view the full file.
[
{
"_id": "2T9Cnce6Brb8J7Z9t",
"homepage": "https://github.com/percolatestudio/meteor-factory",
"name": "dburles:factory"
},
{
"_id": "ftxSeGNb45X7Df8rD",
"homepage": "https://github.com/percolatestudio/meteor-fastclick",
"name": "percolatestudio:fastclick"
@sasikanth513
sasikanth513 / mac-screenshot.md
Created September 26, 2018 04:00
Change default screenshot folder in mac
defaults write com.apple.screencapture location .

Replace . with your path

@sasikanth513
sasikanth513 / horizontal scroll
Created July 22, 2018 05:37
Mac os swift app to add horizontal scroll to the text view
class ViewController: NSViewController {
@IBOutlet weak var scrollView: NSScrollView!
@IBOutlet var textView: NSTextView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.